ci: publish a Homebrew cask instead of a deprecated formula - #36
Merged
Conversation
`brews:` has been deprecated for a while. GoReleaser's own description of
what it produced is "hackyish formulas that would install the
pre-compiled binaries" — a formula is meant to build from source, and
this project ships binaries. A cask is the supported shape for that.
I nearly did not do this, on the belief that casks are macOS-only and the
migration would silently drop the Linux Homebrew support the README
advertises. That belief was out of date. Homebrew's Cask#supports_linux?
reads:
return true if depends_on.requires_linux?
!depends_on.requires_macos?
so a cask is Linux-capable unless it opts out, and cask/dsl.rb documents
per-OS `on_macos`/`on_linux` blocks with their own sha256. GoReleaser's
deprecation note said as much ("this was the only way for Linuxbrew at
the time, but this is no longer true") and I second-guessed it rather
than checking.
Verified rather than assumed: a snapshot build writes
dist/homebrew/Casks/namecom.rb containing on_linux blocks for both amd64
and arm64, with no `depends_on macos` anywhere — which is exactly the
condition supports_linux? tests. Same four platforms as the formula it
replaces, same URLs. Ruby syntax checks clean.
`goreleaser check` now passes with no deprecation warnings for the first
time. That took two steps, not one: `homebrew_casks.binary` is itself
deprecated in favour of `binaries`, which the first attempt tripped over.
Not done here, because it belongs in the tap repository and is
user-facing: tap_migrations.json mapping {"namecom": "namecom"}, plus
deleting Formula/namecom.rb. Until both land, an existing
`brew install namecom` keeps resolving the stale formula and never sees
the cask. The comment in .goreleaser.yaml records this.
`brew trust patramsey/tap` in the README stays correct — brew trust
covers "tap formulae, casks or commands".
This was referenced Aug 18, 2026
patramsey
added a commit
that referenced
this pull request
Aug 18, 2026
Two user-facing changes since v0.2.3. The Go toolchain moves to 1.26.6, clearing four standard-library advisories govulncheck found reachable from this binary. The v0.2.3 binaries were built with 1.26.5 and carry all four, so this release is the only thing that gets the fix to anyone who has already installed -- a green CI job does nothing for them. Homebrew switches from a formula to a cask, which #36 configured but no release has exercised yet. That change is user-facing and was missing from the changelog, so it is recorded here rather than left to whoever wonders why their install method changed. This release is also time-sensitive. The tap has already dropped Formula/namecom.rb and added its migration entry, so until goreleaser publishes Casks/namecom.rb there is no namecom in the tap at all: a fresh `brew install namecom` finds nothing, and an installed user who runs `brew update` in this window spends their one-shot migration while cask_tokens is still empty. Tagging closes it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
brews:has been deprecated for a while. GoReleaser's own description of what it produced is "hackyish formulas that would install the pre-compiled binaries" — a formula is meant to build from source, and this project ships binaries. A cask is the supported shape.I nearly didn't do this, and my reason was wrong
I argued against migrating on the belief that casks are macOS-only, so it would silently drop the Linux Homebrew support the README advertises. That belief is out of date. From Homebrew's source on this machine:
cask/dsl.rbdocuments per-OSon_macos/on_linuxblocks with their ownsha256, andinstaller.rbhas a"This cask requires Linux."path. GoReleaser's deprecation note said exactly this — "this was the only way for Linuxbrew at the time, but this is no longer true" — and I second-guessed it instead of checking.Verified, not assumed
A snapshot build writes
dist/homebrew/Casks/namecom.rbcontaining:No
depends_on macosanywhere — which is precisely the conditionsupports_linux?tests. Same four platforms as the formula it replaces, same URLs.ruby -con the generated file:Syntax OK.goreleaser checkis clean for the first timeThat took two steps, not one:
homebrew_casks.binaryis itself deprecated in favour ofbinaries, which my first attempt tripped over. Now:No deprecation warnings.
Two changes belong in
patramsey/homebrew-tap, not here, and they're user-facing:tap_migrations.jsonat the tap root:{ "namecom": "namecom" }Formula/namecom.rbUntil both land, an existing
brew install namecomkeeps resolving the stale formula and never sees the cask. The migrations file is what makesbrew upgradefollow the rename. I haven't touched the tap — that's a separate repo and affects anyone who has already installed, so it's your call when.Sequencing that avoids a gap: merge this, then make the tap changes, then the next release publishes
Casks/namecom.rband existing users migrate on their nextbrew upgrade.brew trust patramsey/tapin the README stays correct —brew trustcovers "tap formulae, casks or commands".Test plan
goreleaser check— validates with zero deprecation warningsgoreleaser release --snapshot --clean— cask generated successfullyon_linuxblocks for amd64 and arm64depends_on macos(the thingsupports_linux?keys off)ruby -con the generated cask: Syntax OKbrew trustconfirmed to be a real command covering casksrelease.ymlonly runs on tags