Skip to content

Commit a998f43

Browse files
abizerclaude
andauthored
ci: migrate goreleaser brews to homebrew_casks (#8)
## Summary - `brews:` is being phased out by goreleaser ([deprecation notice](https://goreleaser.com/deprecations/#brews)). 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](https://claude.com/claude-code) <!-- CURSOR_SUMMARY --> --- > [!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. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 4c11a84. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY --> Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 0d0b525 commit a998f43

1 file changed

Lines changed: 9 additions & 7 deletions

File tree

.goreleaser.yaml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,25 +25,27 @@ archives:
2525
checksum:
2626
name_template: "checksums.txt"
2727

28-
brews:
28+
homebrew_casks:
2929
- name: nssh
3030
repository:
3131
owner: abizer
3232
name: homebrew-tap
3333
branch: master
3434
token: "{{ .Env.TAP_TOKEN }}"
35-
directory: Formula
3635
homepage: "https://github.com/abizer/nssh"
3736
description: "Paste images into Claude Code over SSH"
38-
license: "MIT"
3937
commit_author:
4038
name: github-actions[bot]
4139
email: github-actions[bot]@users.noreply.github.com
4240
commit_msg_template: "nssh {{ .Tag }}"
43-
install: |
44-
bin.install "nssh"
45-
test: |
46-
assert_match "usage: nssh", shell_output("#{bin}/nssh 2>&1", 1)
41+
# Released binaries aren't notarized; strip the quarantine xattr on install
42+
# so macOS doesn't refuse to launch them.
43+
hooks:
44+
post:
45+
install: |
46+
if OS.mac?
47+
system_command "/usr/bin/xattr", args: ["-dr", "com.apple.quarantine", "#{staged_path}/nssh"]
48+
end
4749
4850
release:
4951
github:

0 commit comments

Comments
 (0)