Skip to content

ci: migrate goreleaser brews to homebrew_casks#8

Merged
abizer merged 1 commit intomasterfrom
nssh-8
May 6, 2026
Merged

ci: migrate goreleaser brews to homebrew_casks#8
abizer merged 1 commit intomasterfrom
nssh-8

Conversation

@abizer
Copy link
Copy Markdown
Owner

@abizer abizer commented May 6, 2026

Summary

  • brews: is being phased out by goreleaser (deprecation notice). The v2.4.0 release log warned about this.
  • Renames the section to homebrew_casks:, drops the formula-only fields (directory, license, install, test), and adds a post-install hook that strips com.apple.quarantine so unsigned darwin binaries actually launch on modern macOS.

Follow-up (in abizer/homebrew-tap)

  • Add tap_migrations.json mapping nssh → cask, and delete the old Formula/nssh.rb so existing brew upgrade nssh users land on the cask.

Test plan

  • Cut a patch release via Actions → release → Run workflow; confirm goreleaser publishes a cask to abizer/homebrew-tap under Casks/nssh.rb
  • brew install --cask abizer/tap/nssh on macOS, then nssh runs without the "damaged / cannot be opened" Gatekeeper alert

🤖 Generated with Claude Code


Note

Low Risk
Low risk: release packaging config change only, but it can affect macOS install/upgrade behavior if the tap expects a formula vs cask or the post-install hook misbehaves.

Overview
Updates GoReleaser Homebrew publishing from deprecated brews to homebrew_casks for nssh, removing formula-specific fields (directory, license, install, test).

Adds a macOS-only post-install hook to strip the com.apple.quarantine xattr from the staged binary so the downloaded (non-notarized) app can launch without Gatekeeper blocking.

Reviewed by Cursor Bugbot for commit 4c11a84. Bugbot is set up for automated code reviews on this repo. Configure here.

goreleaser is phasing out `brews:` in favor of `homebrew_casks:`
(https://goreleaser.com/deprecations/#brews). Migration:

- rename `brews:` -> `homebrew_casks:`
- drop `directory: Formula` (default is Casks)
- drop the formula-style `install:`/`test:` blocks (casks don't use them)
- drop `license:` (no equivalent in cask DSL)
- add a post-install hook that strips com.apple.quarantine, since the
  released darwin binaries aren't code-signed/notarized — without it
  macOS Gatekeeper will refuse to launch them.

Note: the homebrew-tap repo will need a `tap_migrations.json` and the
old `Formula/nssh.rb` removed so existing `brew install abizer/tap/nssh`
users get pointed at the cask. That change lives in the tap repo.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@abizer abizer merged commit a998f43 into master May 6, 2026
2 checks passed
abizer added a commit to abizer/homebrew-tap that referenced this pull request May 6, 2026
## Summary
Companion to [abizer/nssh#8](abizer/nssh#8),
which switches the nssh release pipeline from `brews:` to
`homebrew_casks:`.

- Deletes `Formula/nssh.rb` (stale at v2.1.0; goreleaser will no longer
update it). Once `Casks/nssh.rb` is published by the next release, `brew
install abizer/tap/nssh` will resolve to the cask automatically.

## ⚠️ Existing formula installs need a manual step

`tap_migrations.json` was originally part of this PR but [Codex
correctly pointed
out](#2 (comment))
that same-tap formula→cask migrations are a no-op there (Homebrew's
migration resolver only fires when the destination tap differs). It's
been dropped.

Anyone with the old formula installed will need to run, one time:

\`\`\`
brew uninstall nssh
brew install --cask abizer/tap/nssh
\`\`\`

## ⚠️ Merge ordering

**Do not merge this until a post-migration nssh release has actually
written `Casks/nssh.rb` to this tap.** Sequence:

1. Merge nssh#8
2. Cut a release (Actions → release → Run workflow, \`patch\`)
3. Verify \`Casks/nssh.rb\` lands on master here (auto-committed by
github-actions[bot])
4. Then merge this PR

Otherwise there's a window where \`brew install abizer/tap/nssh\` 404s.

## Test plan
- [ ] After step 3, on a fresh machine: \`brew install abizer/tap/nssh\`
installs the cask
- [ ] On a machine with the old formula installed: \`brew uninstall nssh
&& brew install --cask abizer/tap/nssh\` works
- [ ] \`nssh\` runs without macOS Gatekeeper "damaged / cannot be
opened" alert (post-install hook in nssh#8 strips quarantine)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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