3535 FORCE_JAVASCRIPT_ACTIONS_TO_NODE24 : true
3636
3737jobs :
38- build :
39- name : build-test (${{ matrix.id }})
40- strategy :
41- fail-fast : false
42- matrix :
43- include :
44- - id : macos-universal
45- platform : macos-latest
46- args : --target universal-apple-darwin
47- bundle_dir : src-tauri/target/universal-apple-darwin/release/bundle
48- enabled_input : macos
49- - id : windows-x86_64
50- platform : windows-latest
51- args : " "
52- bundle_dir : src-tauri/target/release/bundle
53- enabled_input : windows
54-
55- if : ${{ inputs.platform == 'all' || inputs.platform == matrix.enabled_input }}
56- runs-on : ${{ matrix.platform }}
38+ macos :
39+ name : build-test (macos-universal)
40+ if : ${{ inputs.platform == 'all' || inputs.platform == 'macos' }}
41+ runs-on : macos-latest
5742 env :
5843 TAURI_SIGNING_PRIVATE_KEY : ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
5944 TAURI_SIGNING_PRIVATE_KEY_PASSWORD : ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
8570 - name : Install Rust
8671 uses : dtolnay/rust-toolchain@stable
8772 with :
88- targets : ${{ startsWith(matrix.id, 'macos-') && ' aarch64-apple-darwin,x86_64-apple-darwin' || '' }}
73+ targets : aarch64-apple-darwin,x86_64-apple-darwin
8974
9075 - name : Cache Rust build
9176 uses : actions/cache@v4
@@ -94,17 +79,21 @@ jobs:
9479 ~/.cargo/registry
9580 ~/.cargo/git
9681 src-tauri/target
97- key : test-rust-${{ runner.os }}-${{ matrix.id }} -${{ hashFiles('src-tauri/Cargo.lock') }}
82+ key : test-rust-${{ runner.os }}-macos-universal -${{ hashFiles('src-tauri/Cargo.lock') }}
9883 restore-keys : |
99- test-rust-${{ runner.os }}-${{ matrix.id }} -
100- rust-${{ runner.os }}-${{ matrix.id }} -
84+ test-rust-${{ runner.os }}-macos-universal -
85+ rust-${{ runner.os }}-macos-universal -
10186 rust-${{ runner.os }}-
10287
10388 - name : Install dependencies
10489 run : pnpm install --frozen-lockfile
10590
91+ - name : Apply test build version
92+ shell : bash
93+ run : node scripts/release/prepare-release.mjs "${{ inputs.ref }}" beta
94+
10695 - name : Import Apple signing certificate
107- if : startsWith(matrix.id, 'macos-') && startsWith( inputs.mac_signing, 'developer-id')
96+ if : startsWith(inputs.mac_signing, 'developer-id')
10897 shell : bash
10998 run : |
11099 certificate_path="$RUNNER_TEMP/apple-certificate.p12"
@@ -123,35 +112,102 @@ jobs:
123112 shell : bash
124113 run : |
125114 extra_args=()
126- if [[ "${{ matrix.id }}" == macos-* ]]; then
127- case "${{ inputs.mac_signing }}" in
128- developer-id-skip-stapling)
129- extra_args+=(--skip-stapling)
130- ;;
131- developer-id-notarized)
132- ;;
133- adhoc)
134- unset APPLE_CERTIFICATE APPLE_CERTIFICATE_PASSWORD APPLE_SIGNING_IDENTITY APPLE_ID APPLE_PASSWORD APPLE_TEAM_ID KEYCHAIN_PASSWORD
135- extra_args+=(--config '{"bundle":{"macOS":{"signingIdentity":"-","hardenedRuntime":false}}}')
136- ;;
137- unsigned)
138- extra_args+=(--no-sign)
139- ;;
140- esac
141- fi
142- pnpm tauri build ${{ matrix.args }} "${extra_args[@]}"
115+ case "${{ inputs.mac_signing }}" in
116+ developer-id-skip-stapling)
117+ extra_args+=(--skip-stapling)
118+ ;;
119+ developer-id-notarized)
120+ ;;
121+ adhoc)
122+ unset APPLE_CERTIFICATE APPLE_CERTIFICATE_PASSWORD APPLE_SIGNING_IDENTITY APPLE_ID APPLE_PASSWORD APPLE_TEAM_ID KEYCHAIN_PASSWORD
123+ extra_args+=(--config '{"bundle":{"macOS":{"signingIdentity":"-","hardenedRuntime":false}}}')
124+ ;;
125+ unsigned)
126+ extra_args+=(--no-sign)
127+ ;;
128+ esac
129+ pnpm tauri build --target universal-apple-darwin "${extra_args[@]}"
130+
131+ - name : Stage bundle artifacts
132+ shell : bash
133+ env :
134+ BUNDLE_SOURCE_DIR : src-tauri/target/universal-apple-darwin/release/bundle
135+ RELEASE_BUILD_ID : macos-universal-test
136+ RELEASE_STAGE_DIR : release-artifacts
137+ run : node scripts/release/stage-bundle-artifacts.mjs
138+
139+ - name : Upload bundle artifacts
140+ uses : actions/upload-artifact@v4
141+ with :
142+ name : test-bundle-macos-universal
143+ path : release-artifacts/macos-universal-test/*
144+ if-no-files-found : error
145+
146+ windows :
147+ name : build-test (windows-x86_64)
148+ if : ${{ inputs.platform == 'all' || inputs.platform == 'windows' }}
149+ runs-on : windows-latest
150+ env :
151+ TAURI_SIGNING_PRIVATE_KEY : ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
152+ TAURI_SIGNING_PRIVATE_KEY_PASSWORD : ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
153+
154+ steps :
155+ - name : Checkout
156+ uses : actions/checkout@v4
157+ with :
158+ ref : ${{ inputs.ref }}
159+
160+ - name : Setup pnpm
161+ uses : pnpm/action-setup@v4
162+ with :
163+ version : 10.23.0
164+
165+ - name : Setup Node
166+ uses : actions/setup-node@v4
167+ with :
168+ node-version : 22
169+ cache : pnpm
170+
171+ - name : Install Rust
172+ uses : dtolnay/rust-toolchain@stable
173+
174+ - name : Cache Rust build
175+ uses : actions/cache@v4
176+ with :
177+ path : |
178+ ~/.cargo/registry
179+ ~/.cargo/git
180+ src-tauri/target
181+ key : test-rust-${{ runner.os }}-windows-x86_64-${{ hashFiles('src-tauri/Cargo.lock') }}
182+ restore-keys : |
183+ test-rust-${{ runner.os }}-windows-x86_64-
184+ rust-${{ runner.os }}-windows-x86_64-
185+ rust-${{ runner.os }}-
186+
187+ - name : Install dependencies
188+ run : pnpm install --frozen-lockfile
189+
190+ - name : Apply test build version
191+ shell : bash
192+ env :
193+ RELEASE_WINDOWS_BUNDLE_VERSION : true
194+ run : node scripts/release/prepare-release.mjs "${{ inputs.ref }}" beta
195+
196+ - name : Build desktop bundle
197+ shell : bash
198+ run : pnpm tauri build
143199
144200 - name : Stage bundle artifacts
145201 shell : bash
146202 env :
147- BUNDLE_SOURCE_DIR : ${{ matrix.bundle_dir }}
148- RELEASE_BUILD_ID : ${{ matrix.id }} -test
203+ BUNDLE_SOURCE_DIR : src-tauri/target/release/bundle
204+ RELEASE_BUILD_ID : windows-x86_64 -test
149205 RELEASE_STAGE_DIR : release-artifacts
150206 run : node scripts/release/stage-bundle-artifacts.mjs
151207
152208 - name : Upload bundle artifacts
153209 uses : actions/upload-artifact@v4
154210 with :
155- name : test-bundle-${{ matrix.id }}
156- path : release-artifacts/${{ matrix.id }} -test/*
211+ name : test-bundle-windows-x86_64
212+ path : release-artifacts/windows-x86_64 -test/*
157213 if-no-files-found : error
0 commit comments