Skip to content

build(release): publish brew cask to remetric-dev/homebrew-tap on each tag#21

Merged
cicdteam merged 1 commit into
mainfrom
homebrew-tap
May 22, 2026
Merged

build(release): publish brew cask to remetric-dev/homebrew-tap on each tag#21
cicdteam merged 1 commit into
mainfrom
homebrew-tap

Conversation

@cicdteam

Copy link
Copy Markdown
Contributor

Summary

Wires GoReleaser to publish a Homebrew Cask to a new remetric-dev/homebrew-tap repo on every tag. After this PR merges and the manual setup below is done, the next release tag auto-populates Casks/remetric.rb and users can:

brew install remetric-dev/tap/remetric

GoReleaser v2.10 deprecated brews: in favour of homebrew_casks: for prebuilt-binary distribution; this PR uses the new section directly rather than pinning an older GoReleaser version.

Manual prerequisites (one-time, after merge)

These have to be done by a human with org-admin rights; they can't go in this PR.

  1. Create empty tap repo:

    gh repo create remetric-dev/homebrew-tap --public \
      --description "Homebrew tap for remetric" --add-readme
  2. Create a fine-grained PAT at https://github.com/settings/personal-access-tokens with:

    • Resource owner: remetric-dev
    • Repository access: remetric-dev/homebrew-tap only
    • Permission: Contents: Read and write
    • No expiration (or as long as practical).
  3. Add PAT as repo secret in remetric-dev/remetric:

    • Settings -> Secrets and variables -> Actions -> New repository secret
    • Name: HOMEBREW_TAP_TOKEN
    • Value: the PAT from step 2
  4. Tag a release (next v0.1.0-rc.N or v0.1.0). The release workflow runs goreleaser which pushes Casks/remetric.rb to the tap repo.

  5. Verify with brew install remetric-dev/tap/remetric && remetric --version.

Test plan

  • make release-check (goreleaser v2.10.0) - config validates clean.
  • CI green on this PR (only ci workflow runs; release triggers on tag).
  • Post-merge + manual setup: next git tag v0.1.0-rc.X && git push origin v0.1.0-rc.X runs release workflow successfully and produces a non-empty Casks/remetric.rb in the tap repo.
  • brew install remetric-dev/tap/remetric installs the binary and remetric --version prints the expected version.

Files

  • .goreleaser.yml: add homebrew_casks: section pointing at the tap repo.
  • .github/workflows/release.yml: pass HOMEBREW_TAP_TOKEN secret into the goreleaser step.
  • README.md: add Homebrew install section; drop "No Homebrew tap" from "What's still missing".
  • docs/getting-started.md: add Homebrew install line.

…h tag

GoReleaser v2.10 deprecated `brews:` in favour of `homebrew_casks:`, which
matches its prebuilt-binary distribution model better than legacy Formula
recipes. The release workflow now pushes a Cask file to
`remetric-dev/homebrew-tap/Casks/remetric.rb` on every tag.

After-merge user-facing install:

    brew install remetric-dev/tap/remetric

README and docs/getting-started point at the new command. The README
"What's still missing" entry that said "No Homebrew tap" is removed.

The release job needs a new repo secret HOMEBREW_TAP_TOKEN: a fine-grained
PAT with `contents: write` on remetric-dev/homebrew-tap. The empty tap
repo also needs to exist before the first tag after this PR. These are
manual steps documented in the PR description.
@cicdteam cicdteam merged commit 876a1f0 into main May 22, 2026
4 checks passed
@cicdteam cicdteam deleted the homebrew-tap branch May 22, 2026 20:16
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.

1 participant