fix(release): make the Portal macOS package actually build and ship signed
- commit
- c9ba9802ae8027571a73f35c49b6763a6373f289
- parent
- 86cb5c2723b2b2e2aa1d74d1a389c3b4885aa42a
- parent
- d548572a3110f017d0e1146a3ed79c5a076834bb
- author
- FelineStateMachine <dami.etoile@gmail.com>
| M | .github/ | 3 | +++ |
| M | scripts/ | 11 | +++++++++++ |
@@ -102,6 +102,9 @@ jobs:
102102 - name: Build unsigned preview bundles103103 shell: bash104104 run: |105+ # portal-dist is build.rs output and is not committed; tauri checks106+ # frontendDist before cargo runs, so materialize it first.107+ cargo check --locked -p portal105108 cargo tauri build --ci \106109 --target "${{ matrix.target }}" \107110 --bundles "${{ matrix.bundles }}" \@@ -141,6 +141,17 @@ fi
141141 source "$HOME/.cargo/env"142142 (143143 cd "$repo_dir"144+ # `portal-dist` is generated by src-tauri/build.rs and is not committed, but145+ # `cargo tauri build` validates frontendDist before cargo runs any build146+ # script. Materialize it first so a clean checkout can build at all.147+ cargo check --locked -p portal148+ if [[ "$signing_mode" == adhoc ]]; then149+ # `-` is the ad-hoc pseudo-identity, not an Apple credential, so it does not150+ # violate the guard above. Tauri must apply it *during* bundling: the DMG is151+ # built from the .app, so signing afterwards would publish a DMG containing152+ # an unsigned bundle that arm64 macOS refuses to execute.153+ export APPLE_SIGNING_IDENTITY=-154+ fi144155 # tauri-cli has no --locked flag; cargo args go after `--`.145156 cargo tauri build --ci --target aarch64-apple-darwin --bundles app,dmg -- --locked146157 )