Thanks to visit codestin.com
Credit goes to github.com

Skip to content

ci: auto-update the Homebrew tap formula on each release#56

Merged
PeterKneale merged 1 commit into
mainfrom
ci/tap-auto-update
Jun 25, 2026
Merged

ci: auto-update the Homebrew tap formula on each release#56
PeterKneale merged 1 commit into
mainfrom
ci/tap-auto-update

Conversation

@PeterKneale

Copy link
Copy Markdown
Owner

What

Adds an update-formula job to the Release binaries workflow so the Homebrew tap formula never lags behind a release. After the four binaries are attached, it regenerates Formula/bioassert.rb in PeterKneale/homebrew-tap with the new version and checksums and pushes it.

How

  • New script .github/scripts/update-homebrew-formula.sh reads the published bioassert-<version>-<platform>.sha256 assets and writes a fresh prebuilt-binary formula (tested locally against v3.1.2: valid Ruby, all four checksums match the published files).
  • The update-formula job needs: upload-binaries, checks out the tap, runs the script, and commits/pushes if the formula changed.

Required setup

Pushing to the separate tap repo needs a secret HOMEBREW_TAP_TOKEN with contents:write on PeterKneale/homebrew-tap (a fine-grained PAT scoped to that repo, or a classic PAT with repo). Add it under the bioassert repo's Actions secrets.

If the secret is absent the job logs a warning and skips, so releases keep working until it is configured.

🤖 Generated with Claude Code

Add an update-formula job to the Release binaries workflow that, after all
four binaries are attached, regenerates Formula/bioassert.rb in the
PeterKneale/homebrew-tap repo with the new version and checksums and pushes
it, so `brew install` always tracks the latest release.

The formula is rebuilt by .github/scripts/update-homebrew-formula.sh, which
reads the published .sha256 assets. Pushing to the separate tap repo needs a
HOMEBREW_TAP_TOKEN secret (contents:write on homebrew-tap); when it is not
set the job logs a warning and skips rather than failing the release.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Copilot AI review requested due to automatic review settings June 25, 2026 02:04

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR ensures the Homebrew tap formula is automatically updated whenever a new GitHub Release is published, keeping brew install aligned with the just-published binaries.

Changes:

  • Adds an update-formula job to the release workflow that runs after all release binaries are uploaded.
  • Introduces a script to regenerate the Homebrew formula by downloading the release’s published .sha256 assets and rewriting the formula with updated URLs/checksums.
  • Commits and pushes the updated formula to PeterKneale/homebrew-tap when changes are detected (and safely skips if HOMEBREW_TAP_TOKEN is not configured).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
.github/workflows/release-binaries.yml Adds a post-upload job to regenerate, commit, and push the Homebrew formula to the external tap repo (gated on a secret token).
.github/scripts/update-homebrew-formula.sh New helper script that downloads release checksum assets via gh and rewrites Formula/bioassert.rb with updated version/URLs/checksums.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@PeterKneale PeterKneale merged commit 3aad62d into main Jun 25, 2026
4 checks passed
@github-actions github-actions Bot mentioned this pull request Jun 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants