Skip to content

Sign Windows exe and notarize the macOS universal binary - #46

Merged
davidnewhall merged 1 commit into
mainfrom
dn2_release
Aug 25, 2026
Merged

Sign Windows exe and notarize the macOS universal binary#46
davidnewhall merged 1 commit into
mainfrom
dn2_release

Conversation

@davidnewhall

Copy link
Copy Markdown
Contributor

Summary

  • Stay on ubuntu-latest with GoReleaser Pro (GORELEASER_KEY from secrets.GORELEASER_PRO_KEY), pinned action SHAs, 60m timeout, and id-token: write for signerd OIDC.
  • Authenticode-sign each Windows PE from builds.hooks.post via init/windows/signexe.sh (temp GOBIN, never /usr/bin/codesign). Skips when CODESIGN_URL is unset.
  • Notarize the universal darwin binary with quill (MACOS_SIGN_* / MACOS_NOTARY_*), enabled only when MACOS_SIGN_P12 is set.

Test plan

  • Tag a release (or dry-run) and confirm Windows exes are signed when codesign secrets are present
  • Confirm the darwin universal binary is signed and notarized
  • Confirm a local snapshot still works with those secrets unset
  • Confirm GPG, Homebrew, and packagecloud still run

Made with Cursor

Stay on Ubuntu with GoReleaser Pro. Skip Authenticode and Apple signing when the matching secrets are unset.

Co-authored-by: Cursor <cursoragent@cursor.com>
@davidnewhall
davidnewhall merged commit bd9faad into main Aug 25, 2026
7 checks passed
@davidnewhall
davidnewhall deleted the dn2_release branch August 25, 2026 07:12
@golift-bot
golift-bot requested a lite review from Copilot August 25, 2026 07:19

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR enhances the release pipeline by adding Authenticode signing for Windows executables and signing/notarization for the macOS universal binary, integrated into the existing GoReleaser-driven GitHub Actions release workflow.

Changes:

  • Added a Windows PE signing helper (init/windows/signexe.sh) intended for GoReleaser post-build hooks.
  • Updated .goreleaser.yaml to introduce a build ID, run the Windows signing hook post-build, and notarize the macOS universal binary when macOS signing credentials are present.
  • Updated the GitHub Actions release workflow to use GoReleaser Pro, add OIDC permissions, install the golift codesign CLI into a temp location, and pass signing/notary secrets into the release step.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
init/windows/signexe.sh Adds a Bash helper to locate the intended codesign CLI and sign Windows PE artifacts.
.goreleaser.yaml Adds build ID, Windows post-hook for signing, and macOS universal binary notarization configuration.
.github/workflows/release.yml Switches to GoReleaser Pro setup, adds OIDC permission, installs codesign CLI, and supplies signing/notary env vars.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread init/windows/signexe.sh
Comment on lines +13 to +26
function pick_codesign() {
if [ -n "${CODESIGN_BIN:-}" ]; then
echo "${CODESIGN_BIN}"
return
fi
if [ -n "${GOBIN:-}" ] && [ -x "${GOBIN}/codesign" ]; then
echo "${GOBIN}/codesign"
return
fi
gopath="$(go env GOPATH 2>/dev/null || true)"
if [ -n "${gopath}" ] && [ -x "${gopath}/bin/codesign" ]; then
echo "${gopath}/bin/codesign"
return
fi
Comment on lines +38 to +47
- name: Install golift codesign
env:
GOBIN: ${{ runner.temp }}/codesign-bin
run: |
set -euo pipefail
mkdir -p "${GOBIN}"
go install golift.io/codesign/cmd/codesign@v1.0.3
echo "${GOBIN}" >> "${GITHUB_PATH}"
echo "CODESIGN_BIN=${GOBIN}/codesign" >> "${GITHUB_ENV}"
- uses: goreleaser/goreleaser-action@f06c13b6b1a9625abc9e6e439d9c05a8f2190e94 # v7.2.3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants