Repository navigation
build: use an API key for macOS notarization #3775
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
Changes from 7 commits
9d89622
a784975
f9c7759
634c82f
8566481
6d5c76e
eccd9cd
89f778d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| Mac releases use an Apple API key for notarization instead of an account password. (#3775) — thanks @velixio! |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -105,11 +105,12 @@ Gatekeeper, and neither means the download is broken: | |
| - **"VoiceStudio cannot be opened because the developer cannot be verified"**: | ||
| the milder form of the same check, which offers an Open path. | ||
|
|
||
| Release builds are not notarized yet because that needs signing secrets the | ||
| public release CI does not hold (tracked in #1779). Some builds are signed ad | ||
| hoc (`identity: '-'`), which is not an Apple identity. Environments that forbid | ||
| the workarounds below need a signed, notarized release; bypassing Gatekeeper is | ||
| not a substitute. | ||
| The release workflow requires Developer ID signing and notarization unless an | ||
| unsigned release is explicitly approved. Older releases and local test builds | ||
| may be signed ad hoc (`identity: '-'`), which is not an Apple identity. Check | ||
| the signing status for the specific release you downloaded. Environments that | ||
| require signed, notarized apps must use a qualifying release; bypassing | ||
| Gatekeeper is not a substitute. | ||
|
|
||
| **Check the download first.** Compute its SHA-256 and compare it with | ||
| `SHA256SUMS.txt` from the same GitHub Release: | ||
|
|
@@ -152,9 +153,8 @@ Anyway"**. You confirm once per install; later launches work by double-click. | |
|
|
||
| The maintained Electron release workflow uses a Developer ID Application | ||
| certificate (`ELECTRON_MACOS_CSC_LINK` and `ELECTRON_MACOS_CSC_KEY_PASSWORD`) | ||
| plus `APPLE_ID`, `APPLE_APP_SPECIFIC_PASSWORD` and `APPLE_TEAM_ID` for | ||
| notarization. The Apple password is an **app-specific password**, not the | ||
| account login password. See [the release guide](../RELEASING.md#credentials) | ||
| plus `APPLE_API_KEY`, `APPLE_API_KEY_ID` and `APPLE_API_ISSUER` for | ||
| notarization with an App Store Connect team API key. See [the release guide](../RELEASING.md#credentials) | ||
|
Comment on lines
+156
to
+157
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Update the stale release-status statement. The earlier Gatekeeper section still says release builds are not notarized because CI lacks signing secrets, which conflicts with the workflow described at Lines [153-156]. Replace that statement with the current Developer ID signing and notarization requirements.
|
||
| for all platform credentials and verification gates. An Apple Developer | ||
| membership is required; the archived Tauri workflow's `APPLE_CERTIFICATE` | ||
| secrets do not sign Electron installers. | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| #!/usr/bin/env bash | ||
| # Source in the packaging step: GitHub stores PEM text, electron-builder needs a path. | ||
| # Password credentials take precedence inside electron-builder; never inherit them. | ||
| set +x | ||
| unset APPLE_ID APPLE_APP_SPECIFIC_PASSWORD | ||
| if [ -n "${APPLE_API_KEY:-}${APPLE_API_KEY_ID:-}${APPLE_API_ISSUER:-}" ]; then | ||
| for name in APPLE_API_KEY APPLE_API_KEY_ID APPLE_API_ISSUER; do | ||
| if [ -z "${!name:-}" ]; then | ||
| echo "::error::Notarization API credentials are incomplete: $name is missing" >&2 | ||
| return 1 | ||
| fi | ||
| done | ||
| : "${RUNNER_TEMP:?RUNNER_TEMP must identify the job temporary directory}" | ||
| NOTARY_KEY_DIR="$(mktemp -d "$RUNNER_TEMP/apple-notary.XXXXXX")" | ||
| trap 'rm -rf -- "$NOTARY_KEY_DIR"' EXIT | ||
| (umask 077; printf '%s' "$APPLE_API_KEY" > "$NOTARY_KEY_DIR/AuthKey.p8") | ||
| export APPLE_API_KEY="$NOTARY_KEY_DIR/AuthKey.p8" | ||
| if [ -n "${CSC_LINK:-}" ] && [ -n "${CSC_KEY_PASSWORD:-}" ]; then | ||
| # Older tag configs derive these from Apple password variables. Override | ||
| # them through electron-builder so rebuilding a tag still notarizes by API. | ||
| mac_notarization_args=(--config.mac.notarize=true --config.mac.hardenedRuntime=true) | ||
| fi | ||
| fi |
Uh oh!
There was an error while loading. Please reload this page.