Skip to content

ci(desktop): mac code-signing + App Store Connect API-key notarization#30

Merged
DragonnZhang merged 1 commit into
mainfrom
lazzy/desktop-mac-signing
Jun 16, 2026
Merged

ci(desktop): mac code-signing + App Store Connect API-key notarization#30
DragonnZhang merged 1 commit into
mainfrom
lazzy/desktop-mac-signing

Conversation

@LaZzyMan

Copy link
Copy Markdown
Collaborator

What this PR does

Switches the macOS desktop release notarization path from Apple ID + app-specific password to the App Store Connect API key method. The Configure optional signing secrets step now reads APPLE_NOTARY_API_KEY_P8_BASE64, APPLE_NOTARY_KEY_ID, and APPLE_NOTARY_ISSUER_ID, materializes the .p8 to a temp file, and exports APPLE_API_KEY / APPLE_API_KEY_ID / APPLE_API_ISSUER — which electron-builder (>=24) consumes to notarize via notarytool. The existing unsigned-draft fallback (allow_unsigned_artifacts for dry-run / draft) is preserved.

Why it's needed

The App Store Connect API key method is more robust than Apple ID + app-specific password (no 2FA prompts, no password expiry) and is what electron-builder >=24 natively consumes. It reuses the notary key already provisioned for the org's Apple Developer account (team NF4574S59H). The same change has been validated end-to-end on the upstream qwen-code desktop pipeline (sign + notarize green on a dry-run).

Secrets (configured in repo)

MAC_CSC_LINK, MAC_CSC_KEY_PASSWORD, APPLE_TEAM_ID, APPLE_NOTARY_API_KEY_P8_BASE64, APPLE_NOTARY_KEY_ID, APPLE_NOTARY_ISSUER_ID (same Apple team / Developer ID cert / notary key as qwen-code).

Scope

Workflow-only. The build helpers build-dmg.sh / scripts/build/darwin.ts are intentionally left untouched here — their NOTARIZE dead-code cleanup flows in via the upstream qwen-code desktop sync to avoid sync conflicts; neither runs in CI (the build job calls electron-builder directly via dist:mac:no-publish).

Verification

End-to-end signing + notarization to be validated via a dry_run=true Desktop Release run on this branch once MAC_CSC_KEY_PASSWORD is set.

Switch the macOS desktop release notarization path from the Apple ID +
app-specific password method to the App Store Connect API key method,
which is more robust (no 2FA, no password expiry) and reuses the notary
key already provisioned for the org's Apple Developer account.

The signing step now reads APPLE_NOTARY_API_KEY_P8_BASE64,
APPLE_NOTARY_KEY_ID, and APPLE_NOTARY_ISSUER_ID, decodes the .p8 to a
temp file, and exports APPLE_API_KEY/APPLE_API_KEY_ID/APPLE_API_ISSUER,
which electron-builder (>=24) consumes to notarize via notarytool. The
existing unsigned-draft fallback behavior is preserved.
@DragonnZhang DragonnZhang merged commit 0a8634f into main Jun 16, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants