Skip to content

Release

Release #10

Workflow file for this run

name: Release
on:
push:
tags:
- "v*"
workflow_dispatch:
inputs:
tag:
description: "Tag/version for a draft release (e.g. v2.2.0). Leave empty to build workflow artifacts only."
required: false
permissions:
contents: write
jobs:
macos:
name: macOS arm64 packages
runs-on: macos-14
steps:
- uses: actions/checkout@v5
- name: Install dependencies
run: |
brew update
brew install cmake ninja libsndfile dylibbundler
- name: Install Qt 6.8
uses: jurplel/install-qt-action@v4
with:
version: "6.8.0"
host: mac
target: desktop
arch: clang_64
modules: ""
cache: true
- name: Configure
run: |
cmake -S . -B build -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_PREFIX_PATH="${Qt6_DIR}"
- name: Build
run: cmake --build build --parallel
- name: Package (DMG)
run: cmake --build build --target package
- name: Package standalone CMOD
run: cmake --build build --target cmod-package
- uses: actions/upload-artifact@v5
with:
name: macos-packages
if-no-files-found: error
path: |
build/DISSCO-*-Darwin.dmg
build/CMOD-*-Darwin-*.tar.gz
linux:
name: Linux x86_64 packages
# Pinned to 22.04 for older glibc: AppImages built here run on more
# downstream distros than ones built on 24.04+.
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v5
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
build-essential cmake ninja-build \
libsndfile1-dev \
libgl1-mesa-dev libfuse2 \
file desktop-file-utils \
libxkbcommon-dev '^libxcb.*-dev' libx11-xcb-dev \
libglu1-mesa-dev libxrender-dev libxi-dev libxkbfile-dev
- name: Install Qt 6.8
uses: jurplel/install-qt-action@v4
with:
# DISSCO's source uses Qt::StringLiterals (6.4+) and project docs
# require >= 6.8. Ubuntu 22.04's apt qt6-base-dev is 6.2 — too old.
version: "6.8.0"
host: linux
target: desktop
arch: linux_gcc_64
modules: ""
cache: true
- name: Configure
run: |
cmake -S . -B build -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_PREFIX_PATH="${Qt6_DIR}"
- name: Build
run: cmake --build build --parallel
- name: Package (AppImage)
env:
# linuxdeploy-plugin-qt picks up qmake via QMAKE; install-qt-action
# exports QT_ROOT_DIR and prepends Qt's bin/ to PATH, so qmake6 is
# findable, but be explicit to avoid surprises.
QMAKE: ${{ env.QT_ROOT_DIR }}/bin/qmake
run: cmake --build build --target appimage
- name: Package standalone CMOD
run: cmake --build build --target cmod-package
- uses: actions/upload-artifact@v5
with:
name: linux-packages
if-no-files-found: error
path: |
build/DISSCO-*-Linux-*.AppImage
build/CMOD-*-Linux-*.AppImage
windows:
name: Windows x64 packages
runs-on: windows-2022
defaults:
run:
shell: pwsh
steps:
- uses: actions/checkout@v5
- name: Configure MSVC environment
uses: ilammy/msvc-dev-cmd@v1
with:
arch: x64
- name: Install NSIS
run: choco install nsis --yes --no-progress
- name: Install Qt 6.8
uses: jurplel/install-qt-action@v4
with:
version: "6.8.0"
host: windows
target: desktop
arch: win64_msvc2022_64
modules: ""
cache: true
- name: Configure
# libsndfile is resolved by FindSndFile, which downloads libsndfile's
# official Windows prebuilt zip when no local install is present
# (DISSCO_SNDFILE_FETCH_PREBUILT, ON by default on Windows). Qt comes
# from install-qt-action's exported Qt6_DIR. XML parsing uses the
# bundled pugixml, so there's no external XML dependency.
run: |
cmake -S . -B build -G Ninja `
-DCMAKE_BUILD_TYPE=Release `
-DCMAKE_PREFIX_PATH="$env:Qt6_DIR"
- name: Build
run: cmake --build build --parallel
- name: Package (NSIS installer)
run: cmake --build build --target package
- name: Package standalone CMOD
run: cmake --build build --target cmod-package
- uses: actions/upload-artifact@v5
with:
name: windows-packages
if-no-files-found: error
path: |
build/DISSCO-*-Windows.exe
build/CMOD-*-Windows-x64.zip
release:
name: Publish GitHub release
needs: [macos, linux, windows]
if: >-
startsWith(github.ref, 'refs/tags/v') ||
(github.event_name == 'workflow_dispatch' && inputs.tag != '')
runs-on: ubuntu-22.04
env:
RELEASE_TAG: ${{ github.event_name == 'workflow_dispatch' && inputs.tag || github.ref_name }}
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
- uses: actions/download-artifact@v5
with:
path: dist
merge-multiple: true
- name: Validate release tag and assets
run: |
major=$(sed -n 's/set(DISSCO_VER_MAJOR \([0-9][0-9]*\))/\1/p' DISSCOVersions.txt)
minor=$(sed -n 's/set(DISSCO_VER_MINOR \([0-9][0-9]*\))/\1/p' DISSCOVersions.txt)
patch=$(sed -n 's/set(DISSCO_VER_PATCH \([0-9][0-9]*\))/\1/p' DISSCOVersions.txt)
expected="v${major}.${minor}.${patch}"
if [[ "${RELEASE_TAG}" != "${expected}" ]]; then
echo "Release tag ${RELEASE_TAG} must match ${expected}." >&2
exit 1
fi
if git show-ref --verify --quiet "refs/tags/${RELEASE_TAG}"; then
tag_commit=$(git rev-list -n 1 "refs/tags/${RELEASE_TAG}")
if [[ "${tag_commit}" != "${GITHUB_SHA}" ]]; then
echo "Existing tag ${RELEASE_TAG} must match the current commit ${GITHUB_SHA}." >&2
exit 1
fi
fi
cd dist
for pattern in \
'DISSCO-*-Darwin.dmg' \
'DISSCO-*-Linux-*.AppImage' \
'DISSCO-*-Windows.exe' \
'CMOD-*-Darwin-*.tar.gz' \
'CMOD-*-Linux-*.AppImage' \
'CMOD-*-Windows-x64.zip'; do
compgen -G "${pattern}" > /dev/null || {
echo "Missing release asset: ${pattern}" >&2
exit 1
}
done
- name: Generate SHA-256 checksums
working-directory: dist
run: sha256sum * > SHA256SUMS
- uses: softprops/action-gh-release@v2
with:
tag_name: ${{ env.RELEASE_TAG }}
target_commitish: ${{ github.sha }}
files: dist/*
draft: ${{ github.event_name == 'workflow_dispatch' }}
generate_release_notes: true