feat: publish prebuilt universal macOS binary on release#660
Open
nenadvulic wants to merge 1 commit into
Open
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.
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.