From 866fa8f8d52f6c1ab97efe2a9e3a649ce1698cfe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Djalma=20Ara=C3=BAjo?= Date: Mon, 5 Oct 2026 19:11:38 -0300 Subject: [PATCH] fix(release): generate the cask with postflight_steps instead of the deprecated postflight hook --- .goreleaser.yaml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index e0924d9..1188f1f 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -52,12 +52,14 @@ homebrew_casks: name: goreleaser-bot email: bot@goreleaser.com # Binário não assinado: remove o quarantine xattr pro Gatekeeper não bloquear. - hooks: - post: - install: | - if OS.mac? - system_command "/usr/bin/xattr", args: ["-dr", "com.apple.quarantine", "#{staged_path}/lk"] - end + # hooks.post.install still writes the deprecated `postflight` (goreleaser/goreleaser#6870), hence custom_block. + # The whole cask passes through the template engine, so Homebrew's {{staged_path}} token must be escaped. + custom_block: | + postflight_steps do + on_macos do + run "/usr/bin/xattr", args: ["-dr", "com.apple.quarantine", "{{ "{{staged_path}}" }}/lk"], must_succeed: false + end + end release: prerelease: auto