Skip to content

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

Merged
norbertdurcansk merged 3 commits into
mainfrom
norbert/gro-1380-homebrew-nix
Nov 19, 2026
Merged

norbertdurcansk merged 3 commits into
mainfrom
norbert/gro-1380-homebrew-nix

Conversation

@norbertdurcansk

@norbertdurcansk norbertdurcansk commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

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 release mints a short-lived token from the homebrew-tap-writer GitHub App (DF-1897); until its secrets are set, the cask is skipped and releases keep working.
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: mints the tap token with actions/create-github-app-token (pinned v3.3.0, scoped to homebrew-tap) and passes it to GoReleaser as HOMEBREW_TAP_GITHUB_TOKEN. The step is skipped while HOMEBREW_TAP_WRITER_APP_CLIENT_ID is empty or PLACEHOLDER (the value infra sets before the real one).
  • 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-writer app (Contents and Pull requests write, installed only on homebrew-tap) and set the HOMEBREW_TAP_WRITER_APP_* secrets declared in duneanalytics/infra#6902 (DF-1897).
    • 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
Contributor Author

@claude auto-approve

norbertdurcansk and others added 2 commits November 19, 2026 09:28
Use the homebrew-tap-writer app (DF-1897) via actions/create-github-app-token,
matching the org pattern, instead of a long-lived token secret. The step and
the cask are skipped until the app secrets exist.

Towards GRO-1380

Amp-Thread-ID: https://ampcode.com/threads/T-01a1ef85-b72d-741e-af78-85fff2e3f20d
Co-authored-by: Amp <amp@ampcode.com>
@norbertdurcansk
norbertdurcansk merged commit fb3046a into main Nov 19, 2026
2 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.

2 participants