8000 Sign and notarize the macOS release build by DominikPalo · Pull Request #20 · DominikPalo/OOXML-Toolkit · GitHub
[go: up one dir, main page]

Skip to content

Sign and notarize the macOS release build - #20

Open
DominikPalo wants to merge 1 commit into
mainfrom
feature/macos-notarization
Open

DominikPalo wants to merge 1 commit into
mainfrom
feature/macos-notarization

Conversation

@DominikPalo
Copy link
Copy Markdown
Owner

What changed

The release workflow now signs the macOS app with a Developer ID certificate and has Apple notarize and staple it. Until now the app was only ad hoc signed, so macOS blocked it on first launch.

  • electron-builder.yml: removed the ad hoc identity and turned the hardened runtime on (required for notarization). electron-builder signs with the Developer ID certificate and notarizes and staples each app when APPLE_ID, APPLE_APP_SPECIFIC_PASSWORD and APPLE_TEAM_ID are set.
  • .github/workflows/release.yml
    • A first macOS step fails with a clear message listing any missing secret or variable. electron-builder itself only warns and skips signing or notarizing when they are missing, which would publish an un-notarized app.
    • The credentials go only to the macOS build step. CSC_LINK would otherwise also be used to sign the Windows build.
    • After the build, each app in the DMGs is checked with codesign, stapler validate and spctl --assess, so a missing ticket fails the release.
    • The build job has a 60-minute timeout so a stuck Apple submission cannot hold a runner for the default 6 hours.
  • package.json: npm run pack now passes -c.mac.identity=null and never signs. Without a Developer ID certificate, electron-builder signs with any other certificate it finds in the keychain, including an "Apple Development" one. That made a local pack take 8+ minutes and could not be notarized.
  • README.md / CHANGELOG.md: replaced the outdated build note and added an Unreleased entry.

Required repository settings (Settings → Secrets and variables → Actions)

Kind Name Value
Secret CSC_LINK the Developer ID Application certificate as .p12, base64-encoded
Secret CSC_KEY_PASSWORD the password the .p12 was exported with
Secret APPLE_APP_SPECIFIC_PASSWORD an app-specific password for the Apple ID
Variable APPLE_ID the Apple ID e-mail
Variable APPLE_TEAM_ID the 10-character team ID

The macOS build fails until all five exist. Notarization needs a Developer ID Application certificate; an "Apple Development" certificate will not work.

Notes for reviewers

  • Not tested end to end. The real signing and notarization could not run without the credentials. Checked locally: the preflight logic with all, some and no variables set; the workflow and builder YAML parse; electron-builder loads the new config and validates its schema; an unpacked build with signing skipped passes e2e/smoke.mjs.
  • Please run "Run workflow" (dry run) on this branch once the five values are set. It exercises the whole macOS path without creating a release.
  • The user-facing "not notarized / Open Anyway" text in the README, the user guide and the v0.3.0 release notes is left unchanged on purpose. It should change with the first notarized release.
  • Locally, npm run dist signs with whichever code-signing identity it finds in the keychain; set CSC_IDENTITY_AUTO_DISCOVERY=false for an unsigned build.

🤖 Generated with Claude Code

The release workflow now signs the macOS app with a Developer ID certificate
and has Apple notarize and staple it, instead of ad hoc signing.

- electron-builder.yml: drop the ad hoc identity, enable the hardened runtime.
- release.yml: fail up front if a signing or notarization secret/variable is
  missing (electron-builder would only warn and skip), pass the credentials to
  the macOS build step only, and verify each app with codesign, stapler and
  spctl. The certificate and passwords are secrets; APPLE_ID and APPLE_TEAM_ID
  are plain repository variables.
- package.json: `npm run pack` never signs, so local unpacked builds do not
  pick up an unrelated keychain identity.
- README/CHANGELOG: document the required secrets and variables.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector
chatgpt-codex-connector Bot commented Oct 7, 2026 •
Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-07T10:56:44.956866Z d9ae9e6 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

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.

1 participant

0