Skip to content

Commit 71ea68d

Browse files
committed
Fix release workflow: move secret check from job-level if to step script
secrets context is not available in job-level if conditions. Guard the homebrew update step with a shell check instead.
1 parent d3616be commit 71ea68d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

.github/workflows/release.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,14 +127,18 @@ jobs:
127127
needs: release
128128
runs-on: ubuntu-latest
129129
# Requires HOMEBREW_TAP_TOKEN secret: a PAT with push access to codingagentsystem/homebrew-cas
130-
if: ${{ secrets.HOMEBREW_TAP_TOKEN != '' }}
131130
steps:
132131
- uses: actions/checkout@v4
133132

134133
- name: Update Homebrew formula
135134
env:
136135
GH_TOKEN: ${{ secrets.HOMEBREW_TAP_TOKEN }}
137136
run: |
137+
if [ -z "${GH_TOKEN}" ]; then
138+
echo "HOMEBREW_TAP_TOKEN not set, skipping homebrew update"
139+
exit 0
140+
fi
141+
138142
VERSION="${GITHUB_REF#refs/tags/v}"
139143
140144
# Download and compute SHA256 for each platform

0 commit comments

Comments
 (0)