Skip to content

Release

Release #22

Workflow file for this run

name: Release
on:
pull_request:
types: [closed]
branches: [main]
workflow_dispatch:
jobs:
build-artifacts:
if: github.event_name == 'workflow_dispatch' || github.head_ref == 'release' && github.event.pull_request.merged == true
runs-on: macos-latest
steps:
- uses: actions/checkout@v4.1.7
- name: Install .NET SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: '9.0.x'
- name: Build for Apple Silicon
run: |
dotnet publish -c Release -r osx-arm64 --self-contained -o osx-arm64 -p:AssemblyName=qc-osx-arm64
- name: Build for Intel Macs
run: |
dotnet publish -c Release -r osx-x64 --self-contained -o osx-x64 -p:AssemblyName=qc-osx-x64
- name: Create Universal Binary
run: |
mkdir universal
lipo -create -output universal/qc \
osx-arm64/qc-osx-arm64 \
osx-x64/qc-osx-x64
- name: Create Tarball
run: |
tar -czf qc.tar.gz -C universal .
- name: Upload Artifact
uses: actions/upload-artifact@v4.3.3
with:
name: qc.tar.qz
path: universal
if-no-files-found: error
release:
needs: [build-artifacts]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.7
- uses: actions/download-artifact@v4.1.7
with:
name: qc.tar.qz
path: artifacts
- name: Display the files
run: ls -R artifacts
- name: Create Tarball
run: |
tar -czf qc.tar.gz -C artifacts .
- uses: knope-dev/action@v2.1.0
with:
version: 0.18.2
- run: knope release
env:
GITHUB_TOKEN: ${{ secrets.PAT }}