Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build universal macapp #13

Merged
merged 1 commit into from
Jan 19, 2025
Merged
Show file tree
Hide file tree
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
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