Skip to content

Monthly Distributed Binaries #14

Monthly Distributed Binaries

Monthly Distributed Binaries #14

Workflow file for this run

name: Monthly Distributed Binaries
on:
schedule:
- cron: '17 2 1 * *'
workflow_dispatch:
jobs:
build-and-package:
name: CPack ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-26.04, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v7
- name: NSIS (Windows)
if: matrix.os == 'windows-latest'
run: choco install nsis -y
- name: CMake Configure
if: matrix.os != 'windows-latest'
run: cmake -B bld -DCMAKE_BUILD_TYPE=Release -DNATIVE_OPT=OFF -DPACKAGING=ON
- name: CMake Configure (Windows)
if: matrix.os == 'windows-latest'
run: cmake -G Ninja -B bld -DCMAKE_BUILD_TYPE=Release -DNATIVE_OPT=OFF -DPACKAGING=ON -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl -DCMAKE_CXX_SCAN_FOR_MODULES=OFF -DFMT_MODULE=OFF -DUSE_LTO=OFF
- name: CMake Build
run: cmake --build bld --config Release --parallel
- name: CPack
run: cmake --build bld --config Release --target package --parallel
- name: CPack Source
if: matrix.os == 'ubuntu-26.04'
run: cmake --build bld --config Release --target package_source --parallel
- name: Print NSIS Error Log on Failure
if: failure()
run: |
if (Test-Path "bld/pkg/_CPack_Packages/win64/NSIS/NSISOutput.log") {
Get-Content "bld/pkg/_CPack_Packages/win64/NSIS/NSISOutput.log"
} else {
echo "NSISOutput.log not found at expected path."
}
- name: Upload Package Artifacts
uses: actions/upload-artifact@v7
with:
name: package-${{ matrix.os }}
path: |
bld/pkg/*.deb
bld/pkg/*.dmg
bld/pkg/*.exe
bld/pkg/*.msi
bld/pkg/*.pkg
bld/pkg/*.rpm
bld/pkg/*.sh
bld/pkg/*.tar.gz
bld/pkg/*.tar.xz
bld/pkg/*.zip
create-release:
name: Publish Production Release
needs: build-and-package
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Download All Artifacts
uses: actions/download-artifact@v7
with:
path: release-assets
merge-multiple: true
- name: Generate Dynamic Version Tag
id: version
run: echo "TAG_NAME=v$(date +'0.420.%Y%m%d')" >> $GITHUB_OUTPUT
- name: Publish GitHub Release
uses: softprops/action-gh-release@v3
with:
tag_name: ${{ steps.version.outputs.TAG_NAME }}
name: Monthly Release ${{ steps.version.outputs.TAG_NAME }}
body: |
## Automated Monthly Build
Distributed binaries packaged via CPack thanks to GitHub Actions Runners.
draft: false
prerelease: false
files: release-assets/*