Skip to content

BUILD: Fix bug preventing macOS binaries from being signed and notarized with an Apple Developer ID#4135

Merged
tlimoncelli merged 2 commits intoStackExchange:mainfrom
cafferata:build/goreleaser-signing-notarization
Mar 7, 2026
Merged

BUILD: Fix bug preventing macOS binaries from being signed and notarized with an Apple Developer ID#4135
tlimoncelli merged 2 commits intoStackExchange:mainfrom
cafferata:build/goreleaser-signing-notarization

Conversation

@cafferata
Copy link
Copy Markdown
Collaborator

@cafferata cafferata commented Mar 7, 2026

The notarize.macos section in .goreleaser.yml was silently skipped during the v4.36.0 release build:

sign & notarize macOS binaries
  pipe skipped or partially skipped  reason=no darwin binaries found with ids: dnscontrol

The notarize section defaults to looking for darwin binaries matching the project name ID (dnscontrol), but the build had an explicit id: build, causing the mismatch.

Remove all explicit id: build references and rely on the GoReleaser default ID (which is project_name, i.e. dnscontrol). This is the convention for single-build projects. Three references removed:

  • builds[0].id
  • universal_binaries[0].id
  • dockers_v2[0].ids

Also fixes the documentation: MACOS_NOTARY_KEY must be base64-encoded, not passed as raw PEM content.


goreleaser check
  • checking                                  path=.goreleaser.yml
  • 1 configuration file(s) validated
  • thanks for using GoReleaser!

export MACOS_SIGN_P12=$(base64 -i DeveloperIDApplication.p12)
export MACOS_SIGN_PASSWORD="password"
export MACOS_NOTARY_ISSUER_ID="..."
export MACOS_NOTARY_KEY_ID="..."
export MACOS_NOTARY_KEY=$(base64 -i AuthKey_3ZPM5C6PF9.p8)
goreleaser build --snapshot --clean
  • skipping validate...
  • cleaning distribution directory
  • loading environment variables
  • getting and validating git state
    • git state                                      commit=05e6479ff4fd74c62b3d8f0e56ed0fa9f7d34d3e branch=build/goreleaser-signing-notarization current_tag=v4.36.0 previous_tag=v4.35.0 dirty=true
    • pipe skipped or partially skipped              reason=disabled during snapshot mode
  • parsing tag
  • setting defaults
  • snapshotting
    • building snapshot...                           version=4.36.1-next
  • running before hooks
    • running                                        hook=go fmt ./...
    • running                                        hook=go mod tidy
    • running                                        hook=go generate ./...
  • ensuring distribution directory
  • setting up metadata
  • writing release metadata
  • loading go mod information
  • build prerequisites
  • building binaries
    • building                                       binary=dist/dnscontrol_freebsd_arm64_v8.0/dnscontrol
    • building                                       binary=dist/dnscontrol_darwin_amd64_v1/dnscontrol
    • building                                       binary=dist/dnscontrol_linux_arm64_v8.0/dnscontrol
    • building                                       binary=dist/dnscontrol_darwin_arm64_v8.0/dnscontrol
    • building                                       binary=dist/dnscontrol_windows_amd64_v1/dnscontrol.exe
    • building                                       binary=dist/dnscontrol_windows_arm64_v8.0/dnscontrol.exe
    • building                                       binary=dist/dnscontrol_linux_amd64_v1/dnscontrol
    • building                                       binary=dist/dnscontrol_freebsd_amd64_v1/dnscontrol
  • universal binaries
    • creating from 2 binaries                       id=dnscontrol binary=dist/dnscontrol_darwin_all/dnscontrol
  • sign & notarize macOS binaries
    • signing                                        binary=dist/dnscontrol_darwin_all/dnscontrol
    • sending notarize request                       binary=dist/dnscontrol_darwin_all/dnscontrol
    • notarize still pending                         binary=dist/dnscontrol_darwin_all/dnscontrol
      • took: 12s
  • writing artifacts metadata
  • build succeeded after 20s
  • thanks for using GoReleaser!

Fixes #4117

- The `.p8` key must be base64-encoded, not passed as raw PEM content. Updated the secrets table, encoding instructions, and test example.
@cafferata cafferata requested a review from tlimoncelli March 7, 2026 15:09
@tlimoncelli tlimoncelli changed the title BUILD: GoReleaser remove explicit id: build BUILD: Fix bug preventing macOS binaries from being signed and notarized with an Apple Developer ID Mar 7, 2026
@tlimoncelli tlimoncelli merged commit ea6694d into StackExchange:main Mar 7, 2026
12 checks passed
@cafferata cafferata deleted the build/goreleaser-signing-notarization branch March 7, 2026 22:07
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.

macOS Homebrew binary signing failure

2 participants