From 01893899103c7622949138285045f4337ddf44fb Mon Sep 17 00:00:00 2001 From: Akanksha Trehun Date: Wed, 28 Oct 2026 21:14:18 +0530 Subject: [PATCH 1/2] ci: commit the generated formulas to the Homebrew tap on every release --- .github/workflows/release.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0946e06..e6d3585 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -38,6 +38,7 @@ jobs: group: release env: GH_TOKEN: ${{ github.token }} + TAP_TOKEN: ${{ secrets.HOMEBREW_TAP_TOKEN }} steps: - uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 with: @@ -86,3 +87,16 @@ jobs: git tag "v$VERSION" git push origin "v$VERSION" gh release create "v$VERSION" --generate-notes --verify-tag dist/* + - name: Update the Homebrew tap + if: steps.build.outputs.version != '' && env.TAP_TOKEN != '' + env: + VERSION: ${{ steps.build.outputs.version }} + run: | + git config --global url."https://x-access-token:${TAP_TOKEN}@github.com/".insteadOf "https://github.com/" + git clone --depth 1 https://github.com/runtimeconditions/homebrew-tools.git "$RUNNER_TEMP/tap" + cp dist/rc.rb dist/rc-profiler-go.rb "$RUNNER_TEMP/tap/Formula/" + cd "$RUNNER_TEMP/tap" + git add Formula + git diff --cached --quiet && exit 0 + git -c user.name=github-actions[bot] -c user.email=41898282+github-actions[bot]@users.noreply.github.com commit -m "rc $VERSION" + git push origin HEAD:main From a9378f022484ed2748bba106ab2287f260aac922 Mon Sep 17 00:00:00 2001 From: Akanksha Trehun Date: Wed, 28 Oct 2026 21:14:31 +0530 Subject: [PATCH 2/2] docs: describe the Homebrew tap setup --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index 14bf556..166418a 100644 --- a/README.md +++ b/README.md @@ -34,6 +34,13 @@ macOS, Linux and Windows, `checksums.txt`, build provenance attestations formulas, `rc.rb` and `rc-profiler-go.rb` (built from the latest Go profiler release). Titles follow [Conventional Commits](https://www.conventionalcommits.org/): `feat` releases a minor version, `fix`, `perf` and `revert` a patch, and `!` a major. +### Homebrew tap (maintainers) + +Create `runtimeconditions/homebrew-tools` and add a repository secret `HOMEBREW_TAP_TOKEN` here: a +fine-grained token with contents write access to that repository only. Each release then commits +`Formula/rc.rb` and `Formula/rc-profiler-go.rb` to it. Without the secret the step is skipped, and the +formulas stay attached to the release for copying by hand. + ## Build ```sh