This guide is for maintainers publishing TokenStep for normal macOS users.
- Apple Developer Program membership
- Developer ID Application certificate installed in Keychain
- Xcode Command Line Tools
- Notarization credentials configured for
notarytool
Check local signing identities:
security find-identity -p codesigning -vTOKENSTEP_VERSION=0.2.13 ./script/build_swiftui_and_run.sh --no-launchThis produces a local development app only. It does not create anything under release/ and must not be uploaded as a public build.
Recommended: store credentials in the keychain.
xcrun notarytool store-credentials tokenstep-notary \
--apple-id "you@example.com" \
--team-id "TEAMID" \
--password "app-specific-password"Every public package is notarized. The release script has no sign-only public mode:
TOKENSTEP_VERSION=0.2.13 \
CODE_SIGN_IDENTITY="Developer ID Application: Your Name (TEAMID)" \
TOKENSTEP_NOTARY_PROFILE="tokenstep-notary" \
./script/package_release.sh --notarizeAlternatively, pass credentials through environment variables:
TOKENSTEP_VERSION=0.2.13 \
CODE_SIGN_IDENTITY="Developer ID Application: Your Name (TEAMID)" \
APPLE_ID="you@example.com" \
APPLE_TEAM_ID="TEAMID" \
APPLE_APP_PASSWORD="app-specific-password" \
./script/package_release.sh --notarizeDo not commit Apple credentials to the repository.
The packaging command already runs all of these gates and fails before producing a publishable checksum file if any gate fails:
./script/verify_release_artifacts.sh \
release/TokenStep-0.2.13.dmg \
release/TokenStep-0.2.13.zip \
0.2.13
./script/verify_update_installer.sh \
release/TokenStep-0.2.13.dmg \
0.2.13 \
TokenStepSwift/dist/TokenStep.app/Contents/Helpers/TokenStepHelperverify_release_artifacts.sh requires valid code signatures, stapled notarization tickets, syspolicy_check distribution, Gatekeeper assessment, exact version, and the expected Team ID. This remains authoritative even if the maintainer Mac has Gatekeeper assessments disabled.
Before the release commit, update the release documents (the Release workflow checks the first and last items):
- Add
docs/RELEASE_NOTES_<version>.mdstarting with# TokenStep <version>. - Add the version's summary at the top of
CHANGELOG.md. - Update the "最新版本" section and the DMG download links in
README.mdtoTokenStep-<version>.dmg.
script/prepare_release.sh does all of this except writing the notes. The first run creates a notes template and stops. Fill it in, then run it again:
./script/prepare_release.sh 0.2.20 "<CHANGELOG title>" "<one-paragraph summary>"It also moves the default build version and runs the release contract check. It does not commit.
- Merge the release commit to
mainand wait for CI. - Run the repository's
Releaseworkflow frommainwith the exact version. - The workflow creates a draft and uploads the notarized DMG, ZIP, and checksum file.
- The workflow downloads the draft assets, checks their hashes, reruns distribution and isolated-installer verification, and only then publishes the release as Latest.
Do not manually upload artifacts that did not pass this workflow. A failed post-upload check must leave the release as a draft, never as a public release.
The repository includes a manual Release workflow. Configure these repository secrets first:
CERTIFICATE_P12_BASE64: base64-encoded Developer ID Application.p12CERTIFICATE_PASSWORD: password for the.p12KEYCHAIN_PASSWORD: temporary CI keychain passwordCODE_SIGN_IDENTITY: for exampleDeveloper ID Application: Your Name (TEAMID)APPLE_ID: Apple Developer account emailAPPLE_TEAM_ID: Apple Developer Team IDAPPLE_APP_PASSWORD: app-specific password for notarization
Then run the Release workflow manually from main with a version number such as 0.2.13.
Apple's official overview is here: Notarizing macOS software before distribution.