Skip to content

BUILD: GoReleaser add macOS code signing and notarization#4073

Merged
tlimoncelli merged 2 commits intoStackExchange:mainfrom
cafferata:build/goreleaser-macos-code-signing
Feb 12, 2026
Merged

BUILD: GoReleaser add macOS code signing and notarization#4073
tlimoncelli merged 2 commits intoStackExchange:mainfrom
cafferata:build/goreleaser-macos-code-signing

Conversation

@cafferata
Copy link
Copy Markdown
Collaborator

@cafferata cafferata commented Feb 10, 2026

Problem

After brew install StackExchange/tap/dnscontrol, macOS Gatekeeper shows the following error:

Apple could not verify "dnscontrol" is free of malware that may harm your Mac or compromise your privacy.

The binary is not code-signed and not notarized with Apple.

Set up GitHub Actions Secrets

To enable macOS code signing and notarization, the following 5 secrets need to be created.

Go to repo → SettingsSecrets and variablesActions:

Secret Value
MACOS_SIGN_P12 Base64-encoded .p12 file
MACOS_SIGN_PASSWORD Password of the .p12 certificate
MACOS_NOTARY_ISSUER_ID Issuer ID
MACOS_NOTARY_KEY_ID Key ID
MACOS_NOTARY_KEY Full contents of the .p8 file

All files and values are available in this 1Password share (valid for 14 days, email verification required):

https://share.1password.com/s#3H_ZmXX5_2CHMNGIJS4ybCmJUzolV4qsCJLrC4ZEsOE

MACOS_SIGN_P12 encoding

The .p12 file from 1Password needs to be base64-encoded:

base64 -i DeveloperIDApplication.p12 | pbcopy

MACOS_NOTARY_KEY

Paste the full contents of the .p8 file, including the -----BEGIN PRIVATE KEY----- and -----END PRIVATE KEY----- lines.


The enabled condition in .goreleaser.yml ensures that builds without these secrets continue normally without signing.

@cafferata cafferata added the build Pull requests that updates CI code label Feb 10, 2026
@cafferata cafferata self-assigned this Feb 10, 2026
@cafferata cafferata force-pushed the build/goreleaser-macos-code-signing branch from 8d31e8f to 4318805 Compare February 10, 2026 21:01
@tlimoncelli
Copy link
Copy Markdown
Contributor

tlimoncelli commented Feb 11, 2026

Wow! I've always wondered how code signing was done! how fun!

I've added 4 of those secrets. The last one (the p8 file) wasn't visible in 1password.

Clarification: I need the contents of MACOS_NOTARY_KEY. You can also send it to me via https://transfer.secretoverflow.com/u/tlimoncelli )

CC: @cafferata

@cafferata cafferata force-pushed the build/goreleaser-macos-code-signing branch from 4318805 to 13afdfc Compare February 12, 2026 19:15
@cafferata
Copy link
Copy Markdown
Collaborator Author

The last one (the p8 file) wasn't visible in 1password.

Oeps! 🙇🏼‍♂️

Clarification: I need the contents of MACOS_NOTARY_KEY. You can also send it to me via https://transfer.secretoverflow.com/u/tlimoncelli )

Done! ✍🏻

cc: @tlimoncelli

@cafferata
Copy link
Copy Markdown
Collaborator Author

Wow! I've always wondered how code signing was done! how fun!

Now with more info in the DNSControl documentation! 📚

Copy link
Copy Markdown
Contributor

@tlimoncelli tlimoncelli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All secrets set up. Let me know when to merge!

@cafferata cafferata force-pushed the build/goreleaser-macos-code-signing branch from 13afdfc to 869e20e Compare February 12, 2026 19:29
@cafferata
Copy link
Copy Markdown
Collaborator Author

Ready for merge! Note the extra commit with DNSControl developer documentation for the GoReleaser Homebrew Tap: https://docs.dnscontrol.org/~/revisions/wiZRFHXE4cZbqgyLBPQB/developer-info/goreleaser 📚

@tlimoncelli tlimoncelli merged commit d70cbe8 into StackExchange:main Feb 12, 2026
7 checks passed
@cafferata cafferata deleted the build/goreleaser-macos-code-signing branch February 12, 2026 21:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build Pull requests that updates CI code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants