Repository navigation
Sign and notarize the macOS DMG with a Developer ID - #323
Open
JuergenFleiss wants to merge 6 commits into
Open
JuergenFleiss wants to merge 6 commits into
JuergenFleiss wants to merge 6 commits into
Conversation
When the Apple secrets are set, build-macos-dmg signs every Mach-O file, the frameworks and the app with the hardened runtime, notarizes and staples the app and the DMG, and checks both with spctl. Without the secrets the app keeps PyInstaller's ad-hoc signature, so forks still build. Fixes the XML header of entitlements.plist and documents the signature check and the secrets. Refs aTrainTranscription#239
A secret ending with a newline split the grep pattern, so the identity check passed and codesign then failed with "no identity found". Match the quoted identity and reject line breaks with a clear error.
Collaborator
Author
|
@gerardo-navarro @BW-Projects could one of you have a look? |
JuergenFleiss
marked this pull request as ready for review
October 22, 2026 15:29
The startup checks stay in the release workflow and now run on the Developer ID build: the hardened runtime only applies there, so an ad-hoc build in PR CI cannot catch a missing entitlement. The macOS 27 check starts the app from the signed DMG again before publishing. The PR CI startup jobs, the Zenodo draft-ID handoff with the release lock, and the narrower Windows artifact download move to their own PRs.
This was referenced Oct 23, 2026
Contributor
@JuergenFleiss I will have a look at this. 👍 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Sign the macOS app and DMG with a Developer ID, notarize both, and staple their tickets.
build-macos-dmgsigns every Mach-O file, the frameworks and the app with the hardened runtime, notarizes and staples the app, then signs, notarizes and staples the DMG.spctlchecks both.publish-macos-to-zenodorequires thesigning-verifiedoutput, so an ad-hoc build can never become a release.build-macos-dmgand on macOS 27 from the DMG. The hardened runtime only applies to the Developer ID build, so this is where a missing entitlement shows.entitlements.plistand documents the signature check and the secrets.Split out into separate PRs: #325 (Zenodo draft ID), #326 (Windows artifact download).
#324 (startup checks in PR CI) is seperate, intended to run on PR
References
Follows #316. Closes #239.
Screenshots / Examples
Verification Steps
uv run --no-sync pytest tests/unit/test_release_macos_signing.pyruns the publishing guard and the DMG signing step against stubbedcodesign,spctland notarization (14 cases).27d6217(run): Developer ID signing, app and DMG notarization, stapling, architecture, minimum-OS and signature checks passed. That run did not start the signed app; a newworkflow_dispatchrun on this branch covers the startup under the hardened runtime.