Skip to content

Commit

Permalink
Merge pull request #13 from AbundantSalmon/build-universal-mac-app
Browse files Browse the repository at this point in the history
build universal macapp
  • Loading branch information
AbundantSalmon authored Jan 19, 2025
2 parents 39543c2 + eb41fe4 commit ae17d58
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 10 deletions.
5 changes: 5 additions & 0 deletions .changeset/build_universal_macapp.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
default: patch
---

# build universal macapp
25 changes: 16 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ jobs:
env:
archive_name: artifacts

runs-on: ${{ matrix.os }}
name: ${{ matrix.target }}
runs-on: macos-latest

steps:
- uses: actions/checkout@v4.1.7
Expand All @@ -29,17 +28,25 @@ jobs:
dotnet-version: '9.0.x'
- name: Build for Apple Silicon
run: |
dotnet publish -c Release -r ${{ matrix.target }} --self-contained -o qc-${{ matrix.target }} -p:AssemblyName=qc-${{ matrix.target }}
- name: Set Archive Name (Non-Windows)
id: archive
run: echo "archive_name=qc-${{ matrix.target }}" >> $GITHUB_ENV
dotnet publish -c Release -r osx-arm64 --self-contained -o qc-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 qc-universal
lipo -create -output universal/qc-universal \
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: ${{ matrix.target }}
path: ${{ env.archive_name }}
name: qc-universal
path: universal
if-no-files-found: error

release:
Expand Down
2 changes: 1 addition & 1 deletion knope.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ changelog = "CHANGELOG.md"
name = "prepare-release"

[[package.assets]]
path = "artifacts/qc-osx-arm64"
path = "artifacts/qc-universal"

[[workflows.steps]]
type = "Command"
Expand Down

0 comments on commit ae17d58

Please sign in to comment.