Skip to content

Commit a7e8e77

Browse files
authored
fix(release): write the cask postflight as install steps (#53)
## Summary The release workflow installs GoReleaser `~> v2`, which now resolves to 2.19. That version deprecates `homebrew_casks.hooks.post.install`, and the workflow's `goreleaser check` fails on any deprecated property, so the next release would fail before building. - The cask postflight moves to `install_steps` with `{{ .StagedPath }}`. GoReleaser renders it as a `postflight_steps` block with the absolute `{{staged_path}}` token, which the shared alias job's modernizer passes through unchanged. - GoReleaser pins in workflows move to v2.19.0, which reads `install_steps`. ## Verification - `goreleaser check` with 2.19.0 passes for `.goreleaser.yml`; on `main` it fails with the deprecation. - `goreleaser release --snapshot --clean --skip=publish,before,sign,validate` renders each cask's `postflight_steps` block as `run "/usr/bin/xattr", args: ["-dr", "com.apple.quarantine", "{{staged_path}}/<binary>"]`. <!-- twapp-session: b7acef9e-0a9c-4af5-8ab8-775953bbc6e1 --> Model: Claude Opus 5.5 (1M context, xhigh effort) in Claude Code.
1 parent c753e16 commit a7e8e77

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

‎.github/workflows/arch-package.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
go-version-file: ${{ matrix.go-mod }}
3232
- uses: goreleaser/goreleaser-action@f06c13b6b1a9625abc9e6e439d9c05a8f2190e94 # v7.2.3
3333
with:
34-
version: v2.18.2
34+
version: v2.19.0
3535
args: release --snapshot --clean --skip=before --config ${{ matrix.config }}
3636
- name: Verify both Arch architectures were rendered
3737
shell: bash

‎.github/workflows/release-build-check.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
- name: Install GoReleaser
3434
uses: goreleaser/goreleaser-action@v6
3535
with:
36-
version: v2.17.0
36+
version: v2.19.0
3737
install-only: true
3838
- name: GoReleaser check
3939
run: goreleaser check

‎.goreleaser.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,8 @@ homebrew_casks:
102102
description: Spotify from the command line
103103
hooks:
104104
post:
105-
install: |
106-
system_command "/usr/bin/xattr", args: ["-dr", "com.apple.quarantine", "#{staged_path}/sptfy"]
105+
install_steps: |
106+
run "/usr/bin/xattr", args: ["-dr", "com.apple.quarantine", "{{ .StagedPath }}/sptfy"]
107107
caveats: |
108108
Create a Spotify application, then run:
109109
sptfy init --client-id YOUR_CLIENT_ID

0 commit comments

Comments
 (0)