Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
113 changes: 9 additions & 104 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,118 +11,23 @@ on:
required: false

jobs:
build-release:
strategy:
matrix:
os: [ubuntu-22.04, macos-latest, windows-latest]
fail-fast: false

runs-on: ${{ matrix.os }}

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive

- name: Install dependencies (Linux)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y \
build-essential \
cmake \
ninja-build \
pandoc \
libasound2-dev \
libjack-jackd2-dev \
ladspa-sdk \
libcurl4-openssl-dev \
libfontconfig1-dev \
libfreetype6-dev \
libx11-dev \
libxcomposite-dev \
libxcursor-dev \
libxext-dev \
libxinerama-dev \
libxrandr-dev \
libxrender-dev \
libglu1-mesa-dev \
mesa-common-dev

- name: Install dependencies (macOS)
if: runner.os == 'macOS'
run: |
brew install cmake ninja pandoc

- name: Install dependencies (Windows)
if: runner.os == 'Windows'
run: |
choco install cmake ninja pandoc -y

- name: Setup MSVC environment (Windows)
if: runner.os == 'Windows'
uses: ilammy/msvc-dev-cmd@v1

- name: Configure CMake (Windows)
if: runner.os == 'Windows'
run: cmake -B build -G Ninja -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl -DCMAKE_BUILD_TYPE=Release -DRETUNER_CPACK=ON

- name: Configure CMake (macOS)
if: runner.os == 'macOS'
run: |
cmake -B build \
-G Ninja \
-DRETUNER_CPACK=ON \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX="/"

- name: Configure CMake (Linux)
if: runner.os == 'Linux'
run: |
cmake -B build \
-G Ninja \
-DRETUNER_CPACK=ON \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr

- name: Build
run: cmake --build build --config Release

- name: Create package
run: |
cd build
cmake --build . --target installer --config Release

- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: packages-${{ matrix.os }}
path: build/
retention-days: 1

create-release:
needs: build-release
runs-on: ubuntu-latest

steps:
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: artifacts

- name: Prepare release files
run: |
mkdir -p release-files
find artifacts -type f \( -name "*.sh" -o -name "*.tar.gz" -o -name "*.deb" -o -name "*.zip" -o -name "*.dmg" -o -name "*.pkg" \) -exec cp {} release-files/ \;
ls -la release-files/

- uses: actions/checkout@v4
- name: Create Release
uses: softprops/action-gh-release@v1
with:
files: release-files/*
name: Element v${{ github.event.inputs.version || github.ref_name }}
tag_name: ${{ github.event.inputs.version || github.ref_name }}
body: |
**Element ${{ github.event.inputs.version || github.ref_name }} is now available!**

For a list of notable changes, see the [CHANGELOG](https://github.com/${{ github.repository }}/blob/${{ github.event.inputs.version || github.ref_name }}/CHANGELOG.md).

Please see the release notes below for details on what's changed.
draft: true
generate_release_notes: true
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}