From 1065c6abb0b922973748291930693a164532342a Mon Sep 17 00:00:00 2001 From: Usman Bashir Date: Sun, 25 Oct 2026 12:32:30 +0300 Subject: [PATCH 1/2] Move the cask quarantine hook to Homebrew install steps GoReleaser 2.19 deprecated hooks.post.install, which writes a Ruby postflight block, and goreleaser check exits 2 on deprecated properties. Homebrew 7 also warns about postflight every time it loads the cask. install_steps writes the declarative postflight_steps stanza instead. The steps DSL takes no arbitrary Ruby, so the File.executable? guard becomes on_macos, which Homebrew evaluates at install time. A run step whose executable is missing still fails the install with exit 127, so Linux has to skip the step rather than run it. must_succeed: false keeps macOS installs alive when the attribute is already absent. Loading the cask needs Homebrew 6.0.16 or later, the first release whose run step takes must_succeed. --- .goreleaser.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index d70bc4d..b320b87 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -26,7 +26,7 @@ homebrew_casks: description: Launch Claude Code pre-configured in one word hooks: post: - install: | - if File.executable?("/usr/bin/xattr") - system_command "/usr/bin/xattr", args: ["-dr", "com.apple.quarantine", "#{staged_path}/clau"], must_succeed: false + install_steps: | + on_macos do + run "/usr/bin/xattr", args: ["-dr", "com.apple.quarantine", "{{ .StagedPath }}/clau"], must_succeed: false end From 45bf4b1683197174f66e767bd5f3d9f0de2fe635 Mon Sep 17 00:00:00 2001 From: Usman Bashir Date: Sun, 25 Oct 2026 12:36:56 +0300 Subject: [PATCH 2/2] Put the annotated tag's note above the release changelog release.header renders .TagBody, so a note written in the tag message at tag time lands above GoReleaser's generated changelog. A tag with only a subject line has no body, and its release stays as before. The .TagBody of a lightweight tag is the tagged commit's message body, which would go out as the note without any warning. The release job now fetches the tag objects again, in case checkout replaced them with lightweight refs, and fails unless the pushed ref is an annotated tag. The tagging steps are written down at the top of release.yml. --- .github/workflows/release.yml | 21 +++++++++++++++++++++ .goreleaser.yaml | 2 ++ 2 files changed, 23 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8ef8269..a6d538c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,3 +1,17 @@ +# Release from an annotated tag: +# +# git tag -a vX.Y.Z +# git push origin vX.Y.Z +# +# The tag message is a subject line, a blank line, then the release note. +# The subject stays in git; GoReleaser publishes the note above the +# generated changelog (release.header in .goreleaser.yaml). Git strips +# lines starting with # from tag messages, so write headings as **bold** +# text. --cleanup=verbatim keeps # lines, but in the editor it also keeps +# git's own # instructions, so pair it with -F . +# +# The job refuses a lightweight tag: its .TagBody is the tagged commit's +# message body, which would go out as the release note. name: Release on: push: @@ -11,6 +25,13 @@ jobs: - uses: actions/checkout@v7 with: fetch-depth: 0 + - name: Require an annotated tag + run: | + git fetch --force --tags + if [ "$(git cat-file -t "$GITHUB_REF_NAME")" != tag ]; then + echo "::error::$GITHUB_REF_NAME is not an annotated tag, so its release note would be the commit message. Re-create it with git tag -a." + exit 1 + fi - uses: actions/setup-go@v7 with: go-version: stable diff --git a/.goreleaser.yaml b/.goreleaser.yaml index b320b87..b3d03df 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -14,6 +14,8 @@ archives: formats: [zip] checksum: name_template: checksums.txt +release: + header: "{{ .TagBody }}" homebrew_casks: - name: clau binaries: