Build and publish a prebuilt release binary on tag push - #17
Merged
Merged
Conversation
Adds a build job to what was update-homebrew-tap.yml: it compiles a universal (arm64+x86_64) release binary, packages it with the SWBBuildServiceBundle executable and swift-build's resource bundles, verifies the tarball runs after being extracted elsewhere, and publishes it as a GitHub Release asset. The existing tap-update job now points the Homebrew formula at that asset instead of re-hashing the source archive on every tag, so `brew install` can switch from building from source to unpacking a prebuilt binary.
butterbearbear
approved these changes
Sep 19, 2026
- Verify both staged executables are actually universal via lipo -info instead of relying on --help, which returns before Serve.run() and never exercises the co-located SWBBuildServiceBundle lookup or would catch a single-arch artifact. - Derive the product directory from `swift build --show-bin-path` instead of hardcoding .build/apple/Products/Release. - Let the publish step tolerate a release that already exists (upload instead of create), so a rerun after update-tap fails doesn't die trying to recreate it.
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
update-homebrew-tap.ymltorelease.ymland adds abuildjob that compiles a universal (arm64+x86_64) release binary, packages it withSWBBuildServiceBundleand swift-build's resource bundles, and publishes the tarball as a GitHub Release asset.update-tapnow points the Homebrew formula'surl/sha256at that release asset instead of re-hashing the source archive, sobrew installcan switch to a prebuilt binary. Companion tap PR (source unpack instead ofswift build): Distribute a prebuilt binary instead of building from source homebrew-tap#14Test plan
swift build --configuration release --arch arm64 --arch x86_64 --disable-sandboxlocally; confirmed universal, ad-hoc-signed binary vialipo -info/codesign -dv.sourcekit-xcode-bsp --helpstill runs, proving the co-located-service lookup survives relocation.0.1.0tag once this merges, confirm the workflow builds/publishes/opens the tap PR with a realsha256.🤖 Generated with Claude Code