From 6fc3158a70b11a84add7f6969a61c214337cbfab Mon Sep 17 00:00:00 2001 From: Lukasz Raczylo Date: Thu, 3 Dec 2026 07:47:35 +0000 Subject: [PATCH] ci(pr): grant actions read so the shared PR checks start * ci(pr): grant actions read so the shared PR checks start go-pr.yaml's CodeQL job asks for actions: read. A reusable workflow cannot ask for more than its caller grants, so the whole PR run fails at startup with no jobs. Grant the missing read scope. * fix(goreleaser): use the cask install_steps stanza GoReleaser 2.20 fails goreleaser check when homebrew_casks.hooks.post.install is used: Homebrew deprecated the Ruby postflight stanza in favour of the declarative steps DSL. --------- Co-authored-by: Bug Fixer --- .github/workflows/pr.yaml | 6 ++++++ .goreleaser.yaml | 9 ++++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index b720b7c..a3826f9 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -9,6 +9,12 @@ on: - "**" - "!main" +permissions: + actions: read + contents: read + pull-requests: write + security-events: write + jobs: pr-checks: uses: lukaszraczylo/shared-actions/.github/workflows/go-pr.yaml@main diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 8c56007..e60692d 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -82,11 +82,10 @@ homebrew_casks: license: MIT hooks: post: - install: | - if OS.mac? - system_command "/usr/bin/xattr", - args: ["-dr", "com.apple.quarantine", "#{staged_path}/semver-generator"] - end + # Homebrew deprecated the Ruby postflight stanza; casks only install on + # macOS, so the old OS.mac? guard is no longer needed. + install_steps: | + run "/usr/bin/xattr", args: ["-dr", "com.apple.quarantine", "{{ .StagedPath }}/semver-generator"] signs: - cmd: cosign