Sign Windows exe and notarize the macOS universal binary - #46
Merged
Conversation
Stay on Ubuntu with GoReleaser Pro. Skip Authenticode and Apple signing when the matching secrets are unset. Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
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.yamlto 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
goliftcodesign 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 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 |
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.
Summary
ubuntu-latestwith GoReleaser Pro (GORELEASER_KEYfromsecrets.GORELEASER_PRO_KEY), pinned action SHAs, 60m timeout, andid-token: writefor signerd OIDC.builds.hooks.postviainit/windows/signexe.sh(tempGOBIN, never/usr/bin/codesign). Skips whenCODESIGN_URLis unset.MACOS_SIGN_*/MACOS_NOTARY_*), enabled only whenMACOS_SIGN_P12is set.Test plan
Made with Cursor