Skip to content

feat(install): publish homebrew cask to hmk/tap on each release#22

Merged
hmk merged 1 commit into
mainfrom
feat/homebrew-tap
May 11, 2026
Merged

feat(install): publish homebrew cask to hmk/tap on each release#22
hmk merged 1 commit into
mainfrom
feat/homebrew-tap

Conversation

@hmk
Copy link
Copy Markdown
Owner

@hmk hmk commented May 11, 2026

Summary

Wires up Homebrew distribution via `hmk/homebrew-tap`. After merge + a release, users can install with:

```bash
brew install hmk/tap/try-bedazzled
```

Changes

  • `.goreleaser.yaml` — `homebrew_casks` block (current goreleaser; `brews` is deprecated). Pushes a Cask formula to `hmk/homebrew-tap` on each release using `HOMEBREW_TAP_TOKEN` (fine-grained PAT, Contents:write on the tap repo only).
  • `release.yml` — passes `HOMEBREW_TAP_TOKEN` through to the goreleaser step. Same `release` environment as the signing secrets.
  • README — install section now leads with `brew install`, with the install script as the cross-platform fallback.
  • INSTALL.md — Homebrew section added at the top.

Why this shape

  • Generic tap (`hmk/homebrew-tap`) over per-tool tap: install path becomes `hmk/tap/try-bedazzled` instead of `hmk/try-bedazzled/try-bedazzled`. Leaves room for sibling tools.
  • Cask, not formula: goreleaser's `brews` block is deprecated; `homebrew_casks` is the supported path. Casks work fine for CLIs.
  • Caveats block: brew doesn't edit shell rc files, so the cask prints the `eval "$(try init)"` snippet on install.

Test plan

  • Merge → release-please opens 0.3.0 PR (this is a `feat:`) → merge that → goreleaser publishes the release AND pushes a Cask file to `hmk/homebrew-tap`
  • On a fresh shell: `brew install hmk/tap/try-bedazzled` succeeds
  • `brew info try-bedazzled` shows the caveats with the shell snippet
  • `try --version` reports the installed version
  • `brew upgrade try-bedazzled` works on subsequent releases

🤖 Generated with Claude Code

…lease

Adds homebrew_casks block to .goreleaser.yaml so every release auto-pushes
a Cask formula to hmk/homebrew-tap. Users can then:

  brew install hmk/tap/try-bedazzled

The cask wires the binary into Homebrew's prefix and prints a caveats
block with the shell-rc snippet (eval "$(try init)") since brew doesn't
edit rc files itself.

Why a generic homebrew-tap (not homebrew-try-bedazzled): the install path
becomes hmk/tap/try-bedazzled instead of hmk/try-bedazzled/try-bedazzled.
Cleaner, and leaves room for sibling tools later.

Why a cask (not a formula): goreleaser's `brews` block was deprecated in
favor of `homebrew_casks`. Casks work fine for CLIs — Homebrew doesn't
strictly distinguish between GUI/CLI artifacts here.

The HOMEBREW_TAP_TOKEN secret is a fine-grained PAT scoped to just the
tap repo with Contents:write — minimum surface to push the formula.

README now leads with `brew install hmk/tap/try-bedazzled`, with the
install script as the cross-platform fallback.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@hmk hmk merged commit c17aead into main May 11, 2026
5 checks passed
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