From 4c11a84028b2ffbac411bb03025e5bd7e4e9df80 Mon Sep 17 00:00:00 2001 From: Abizer Lokhandwala Date: Tue, 5 May 2026 17:46:57 -0700 Subject: [PATCH] ci: migrate goreleaser brews -> homebrew_casks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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) --- .goreleaser.yaml | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index b3f0280..57827d7 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -25,25 +25,27 @@ archives: checksum: name_template: "checksums.txt" -brews: +homebrew_casks: - name: nssh repository: owner: abizer name: homebrew-tap branch: master token: "{{ .Env.TAP_TOKEN }}" - directory: Formula homepage: "https://github.com/abizer/nssh" description: "Paste images into Claude Code over SSH" - license: "MIT" commit_author: name: github-actions[bot] email: github-actions[bot]@users.noreply.github.com commit_msg_template: "nssh {{ .Tag }}" - install: | - bin.install "nssh" - test: | - assert_match "usage: nssh", shell_output("#{bin}/nssh 2>&1", 1) + # Released binaries aren't notarized; strip the quarantine xattr on install + # so macOS doesn't refuse to launch them. + hooks: + post: + install: | + if OS.mac? + system_command "/usr/bin/xattr", args: ["-dr", "com.apple.quarantine", "#{staged_path}/nssh"] + end release: github: