ci: auto-bump homebrew formula on release #39

Merged
razvandimescu merged 1 commits from ci/homebrew-auto-bump into main 2026-04-08 08:47:44 +08:00
razvandimescu commented 2026-04-08 08:42:31 +08:00 (Migrated from github.com)

Summary

  • Adds .github/workflows/homebrew-bump.yml — triggered on release: published and workflow_dispatch. Fetches sha256 checksums from published release assets and rewrites the tap formula.
  • Adds scripts/update-homebrew-formula.py — idempotent edit: bumps version, URL paths, and inserts/replaces sha256 lines after each url. Preserves the on_macos/on_linux + Hardware::CPU.arm? structure of the existing formula.
  • Uses HOMEBREW_TAP_GITHUB_TOKEN (already configured as a repo secret) to push directly to razvandimescu/homebrew-tap main.

Notes

  • Formula currently has no sha256 lines (stale at v0.2.0). The script inserts them — strict improvement over url-only.
  • Smoke-tested locally against the real v0.10.0 release assets — produces a valid formula, idempotent on re-run.
  • v0.10.0 itself was released before this automation existed, so after merge we'll fire this via workflow_dispatch once to catch the tap up.

Test plan

  • CI passes on this PR (no tests added, just a workflow/script that runs on release events)
  • After merge, dispatch with version=0.10.0 and verify a commit lands in razvandimescu/homebrew-tap bumping the formula
  • brew update && brew upgrade numa picks up v0.10.0
## Summary - Adds `.github/workflows/homebrew-bump.yml` — triggered on `release: published` and `workflow_dispatch`. Fetches sha256 checksums from published release assets and rewrites the tap formula. - Adds `scripts/update-homebrew-formula.py` — idempotent edit: bumps `version`, URL paths, and inserts/replaces `sha256` lines after each `url`. Preserves the `on_macos`/`on_linux` + `Hardware::CPU.arm?` structure of the existing formula. - Uses `HOMEBREW_TAP_GITHUB_TOKEN` (already configured as a repo secret) to push directly to `razvandimescu/homebrew-tap` main. ## Notes - Formula currently has no sha256 lines (stale at v0.2.0). The script inserts them — strict improvement over url-only. - Smoke-tested locally against the real v0.10.0 release assets — produces a valid formula, idempotent on re-run. - v0.10.0 itself was released before this automation existed, so after merge we'll fire this via `workflow_dispatch` once to catch the tap up. ## Test plan - [ ] CI passes on this PR (no tests added, just a workflow/script that runs on release events) - [ ] After merge, dispatch with `version=0.10.0` and verify a commit lands in `razvandimescu/homebrew-tap` bumping the formula - [ ] `brew update && brew upgrade numa` picks up v0.10.0
Sign in to join this conversation.