ci: build and publish macOS release binaries#947
Merged
Conversation
Add a cross-darwin Makefile target and a macos-release workflow job that builds darwin binaries natively on macOS runners. A CGO-only transitive dependency (vectorized-poseidon-gold) prevents cross-compiling darwin from the linux runner, so each architecture is built on its own runner: macos-13 (Intel/amd64) and macos-14 (Apple Silicon/arm64). Co-authored-by: Cursor <cursoragent@cursor.com>
|
praetoriansentry
approved these changes
Jul 3, 2026
There was a problem hiding this comment.
Pull request overview
Adds native macOS (darwin) release binaries to the existing tag-driven release pipeline, aligning distribution artifacts across Linux and macOS while accommodating a CGO-only dependency that prevents Linux-hosted cross-compilation.
Changes:
- Add a
cross-darwinMakefile target to build a darwin binary for the host macOS architecture with version ldflags. - Extend the release workflow with a
macos-releasematrix job (macos-13amd64,macos-14arm64) to build, tar, and upload macOS artifacts to the GitHub release.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| Makefile | Adds cross-darwin target to build darwin release binaries natively on macOS with CGO enabled. |
| .github/workflows/release.yml | Adds a macOS release job that builds per-arch on macOS runners and uploads darwin tarballs to the release. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+71
to
+82
| - name: Perform darwin build | ||
| run: make cross-darwin | ||
|
|
||
| - name: Compress binary | ||
| run: | | ||
| cd out | ||
| arch=$(go env GOARCH) | ||
| tar czf polycli_${GITHUB_REF#refs/tags/}_darwin_${arch}.tar.gz polycli_${GITHUB_REF#refs/tags/}_darwin_${arch} | ||
|
|
||
| - name: Get git tag | ||
| run: echo "tag=$(git describe --tags --exact-match HEAD)" >> $GITHUB_ENV | ||
|
|
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
Adds macOS binaries to the release, matching the existing Linux ones.
cross-darwinMakefile target builds a darwin binary for the host arch with the same version ldflags as the Linux builds (CGO enabled; static-linking flags dropped since macOS doesn't support them).macos-releaseworkflow job builds natively on a matrix ofmacos-13(Intel →darwin/amd64) andmacos-14(Apple Silicon →darwin/arm64), then tars and uploads to the same release.Why native per-arch instead of cross-compiling from the Linux runner: the transitive
vectorized-poseidon-golddependency is CGO-only with no pure-Go fallback, so darwin can't be cross-compiled from Linux and each arch is built on its own runner.Note: binaries are unsigned/un-notarized, same as the Linux ones.
Made with Cursor