@@ -11,27 +11,17 @@ permissions:
1111
1212jobs :
1313 build-macos :
14- strategy :
15- matrix :
16- include :
17- - target : aarch64-apple-darwin
18- os : macos-14
19- - target : x86_64-apple-darwin
20- os : macos-14
21-
22- runs-on : ${{ matrix.os }}
23-
14+ runs-on : macos-14
2415 env :
2516 APP_VERSION : ${{ github.ref_name }}
26-
2717 steps :
2818 - name : Checkout code
2919 uses : actions/checkout@v4
3020
31- - name : Install Rust toolchain
21+ - name : Install Rust toolchain (both macOS targets)
3222 uses : dtolnay/rust-toolchain@stable
3323 with :
34- targets : ${{ matrix.target }}
24+ targets : aarch64-apple-darwin,x86_64-apple-darwin
3525
3626 - name : Install cargo-bundle
3727 run : cargo install cargo-bundle
@@ -52,31 +42,36 @@ jobs:
5242 uses : actions/cache@v4
5343 with :
5444 path : target
55- key : ${{ runner.os }}-${{ matrix.target }} -cargo-build-${{ hashFiles('**/Cargo.lock') }}
45+ key : ${{ runner.os }}-universal -cargo-build-${{ hashFiles('**/Cargo.lock') }}
5646
57- - name : Build release binary
58- run : cargo bundle --release --target ${{ matrix.target }}
47+ - name : Build release bundles (aarch64 + x86_64)
48+ run : |
49+ cargo bundle --release --target aarch64-apple-darwin
50+ cargo bundle --release --target x86_64-apple-darwin
5951
6052 - name : Create artifacts directory
6153 run : mkdir -p artifacts
6254
63- - name : Package app bundle
55+ - name : Package app bundles
6456 run : |
65- cd target/${{ matrix.target }}/release/bundle/osx
66- zip -r ../../../../../artifacts/rustcast-${{ matrix.target }}.app.zip *.app
57+ cd target/aarch64-apple-darwin/release/bundle/osx
58+ zip -r ../../../../../artifacts/rustcast-aarch64-apple-darwin.app.zip *.app
59+
60+ cd - >/dev/null
61+ cd target/x86_64-apple-darwin/release/bundle/osx
62+ zip -r ../../../../../artifacts/rustcast-x86_64-apple-darwin.app.zip *.app
6763
6864 - name : Upload artifacts
6965 uses : actions/upload-artifact@v4
7066 with :
71- name : macos-${{ matrix.target }}
67+ name : macos-bundles
7268 path : artifacts/*.zip
7369 retention-days : 7
7470
7571 create-release :
7672 needs : build-macos
7773 runs-on : ubuntu-latest
7874 if : startsWith(github.ref, 'refs/tags/')
79-
8075 steps :
8176 - name : Download all artifacts
8277 uses : actions/download-artifact@v4
0 commit comments