ci: notarize macOS binaries via GoReleaser + quill#240
Open
mfacenet wants to merge 1 commit into
Open
Conversation
Add a cross-platform notarize.macos block (quill-backed, no Mac runner needed) to the GoReleaser config and wire the Apple signing secrets into the release workflow. Gated on MACOS_SIGN_P12, so releases without the secrets configured are unaffected. The xattr quarantine-strip postflight in the cask is intentionally kept until a notarized release is verified, then removed in a follow-up.
Contributor
There was a problem hiding this comment.
Pull request overview
Adds optional macOS code signing + notarization to the GoReleaser-driven release pipeline using the notarize.macos (quill-backed) configuration, reusing the existing ubuntu-latest release job and wiring required Apple secrets into the GoReleaser step.
Changes:
- Adds a new
notarize.macosblock to.goreleaser.yamlto sign + submit macOS binaries for notarization. - Exposes Apple signing/notary credentials to the GoReleaser GitHub Action step via workflow
env.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
.goreleaser.yaml |
Adds GoReleaser notarization configuration for macOS artifacts. |
.github/workflows/release.yml |
Passes macOS signing/notary secrets into the GoReleaser release step. |
| # SBOM'd, and cosign-signed. | ||
| notarize: | ||
| macos: | ||
| - enabled: '{{ isEnvSet "MACOS_SIGN_P12" }}' |
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.
What
Adds cross-platform macOS code signing + notarization to the release pipeline using GoReleaser's quill-backed
notarize.macosblock — no macOS runner required, the existingubuntu-latestjob is reused.notarize.macosblock in.goreleaser.yaml, placed pre-archive so the signed+notarized binary is what gets tarred, checksummed, SBOM'd, and cosign-signed.env:inrelease.yml.Safe to merge before secrets exist
The block is gated on
enabled: '{{ isEnvSet "MACOS_SIGN_P12" }}'. With the secrets unset (current state, forks, local/snapshot builds), notarization is silently skipped and the release works unchanged.Required secrets (add to repo before they take effect)
MACOS_SIGN_P12.p12MACOS_SIGN_PASSWORD.p12export passwordMACOS_NOTARY_ISSUER_IDMACOS_NOTARY_KEY_IDMACOS_NOTARY_KEY.p8Follow-up (not in this PR)
The
xattrquarantine-strippostflightin the cask is intentionally kept until a notarized release is verified (cut an RC tag, confirm quill's notarization succeeds), then removed separately. Removing it before notarization is live would reintroduce the Gatekeeper prompt.Validation
goreleaser checkpasses on 2.16.0.Note
Notarized artifacts are bare binaries in
.tar.gz, which can't be stapled (only bundles/dmg/pkg). Gatekeeper does an online check on first run — fine for brew-installed CLIs.