feat: publish prebuilt universal macOS binary on release#660
Open
nenadvulic wants to merge 2 commits into
Open
feat: publish prebuilt universal macOS binary on release#660nenadvulic wants to merge 2 commits into
nenadvulic wants to merge 2 commits into
Conversation
Add release_macos_binary.yml workflow that builds arm64 + x86_64 and merges them into a universal binary via lipo, then uploads danger-swift-macos-universal.tar.gz to the GitHub Release. Update create_homebrew_tap.sh to generate a formula that installs the prebuilt binary directly instead of compiling from source — reducing brew install time from ~10 minutes to a few seconds, and removing the Xcode build dependency from the formula.
f-meloni
reviewed
Jun 16, 2026
f-meloni
left a comment
Member
There was a problem hiding this comment.
Thanks for the PR! Just a comment
| echo "TARBALL=$TARBALL" >> "$GITHUB_ENV" | ||
| echo "VERSION=$VERSION" >> "$GITHUB_ENV" | ||
|
|
||
| - name: Upload to GitHub Release |
Member
There was a problem hiding this comment.
I think we already have a job to create a release today, should we add this to that one instead?
Member
There was a problem hiding this comment.
Author
There was a problem hiding this comment.
@f-meloni Good call, i folded the macOS build into create_release.yml as a release-macos job gated on needs: build, so the binary uploads after the release is created.
This also removes a race: both workflows triggered on the same tag and each created the release (gh release create vs action-gh-release). Standalone workflow deleted.
Merge the standalone release_macos_binary.yml into the existing create_release.yml as a release-macos job gated on needs: build. Both workflows triggered on the same tag and each created the release (gh release create vs action-gh-release), racing on it; ordering the macOS job after build removes that race and keeps all release logic in one workflow.
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.
Problem
The existing
danger/tap/danger-swiftHomebrew formula works locally, but has two issues on CI runners:brew tap danger/taprequires a git clone via HTTPS — this fails silently on environments with restricted network access (e.g. Xcode Cloud), leavingdanger-swiftunavailable with no clear error message.The formula compiles from source (
make install) — this takes ~10 minutes and requires Xcode as a build dependency on every clean CI runner.Solution
This PR adds a
release_macos_binary.ymlworkflow that runs on every tag and:danger-swiftfor botharm64andx86_64lipodanger-swift-macos-universal.tar.gz+ its SHA256 to the GitHub ReleaseIt also updates
Scripts/create_homebrew_tap.shto generate a formula that installs the prebuilt binary directly — removing the Xcode build dependency and reducing install time from ~10 minutes to a few seconds.Result
brew install danger/tap/danger-swift # now takes ~5 secondsThe universal binary works natively on Apple Silicon and under Rosetta (x86_64) without needing
arch -arm64workarounds.