Skip to content

Publish a Homebrew cask to duneanalytics/homebrew-tap - #64

Open
norbertdurcansk wants to merge 1 commit into
mainfrom
norbert/gro-1380-homebrew-nix
Open

norbertdurcansk wants to merge 1 commit into
mainfrom
norbert/gro-1380-homebrew-nix

Conversation

@norbertdurcansk

Copy link
Copy Markdown

What & why

Releases now publish a Homebrew cask, so users can run brew install duneanalytics/tap/dune-cli on macOS and Linux.
GoReleaser opens a PR against the tap instead of pushing, because the tap's main requires PRs (SOC 2 ruleset).
The cask is skipped until the HOMEBREW_TAP_GITHUB_TOKEN secret exists, so releases keep working until then.
Nix support follows in a separate PR.

Architecture

  • .goreleaser.yml: new homebrew_casks entry dune-cli (binary dune). It pushes branch dune-cli-<version> to duneanalytics/homebrew-tap and opens a PR into main. A postflight step removes com.apple.quarantine on macOS, because the binary is not signed or notarized (this is the approach the GoReleaser docs recommend). skip_upload is true while the token is unset and auto once it is set, so prereleases are never published.
  • .github/workflows/release.yml: passes HOMEBREW_TAP_GITHUB_TOKEN to GoReleaser.
  • README: Homebrew install command; .gitignore: /dist/.
  • Tested: goreleaser check (v2.20.2, no deprecations) and goreleaser release --snapshot --clean. I installed the generated cask from a local tap with Homebrew 7.0.14 on macOS arm64, served over HTTP so the download is quarantined. Without the postflight step, the installed binary keeps com.apple.quarantine; with it, the flag is removed and dune --version runs. I also installed it in a homebrew/brew Linux container (Homebrew 7.0.14), where it ran.
  • Not tested: the actual tap push and PR creation, because snapshot mode skips publishing and the token does not exist yet.
  • Needs human eyes:
    • Create the HOMEBREW_TAP_GITHUB_TOKEN repo secret: a fine-grained token or GitHub App token with Contents and Pull requests write access on duneanalytics/homebrew-tap.
    • Each release's cask PR needs 1 approval and a squash merge in the tap (org ruleset).
  • Blast radius: the release workflow only. A failed tap PR is logged and does not fail the release, per the GoReleaser docs.
Agent context
  • No agent review yet.
  • Repro: goreleaser check && goreleaser release --snapshot --clean && cat dist/homebrew/Casks/dune-cli.rb
  • Homebrew 6+ tap trust: installing by the fully qualified name (duneanalytics/tap/dune-cli) trusts that cask. A short-name install needs brew trust.

Towards GRO-1380

GoReleaser now generates the dune-cli cask on each release and opens a
PR against the tap's main branch, which requires PRs. The cask clears the
macOS quarantine bit since the binary is not notarized. Publishing is
skipped until the HOMEBREW_TAP_GITHUB_TOKEN secret exists.

Towards GRO-1380

Amp-Thread-ID: https://ampcode.com/threads/T-01a1ef85-b72d-741e-af78-85fff2e3f20d
Co-authored-by: Amp <amp@ampcode.com>
@norbertdurcansk

Copy link
Copy Markdown
Author

@claude auto-approve

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