Skip to content

Commit 4ba33a2

Browse files
cameroncookeclaude
andcommitted
ci(release): Use env guard for Homebrew tap token checks
Replace secrets context in step if expressions with env-based checks so workflow_dispatch validation succeeds and isolated Homebrew tests can run. Co-Authored-By: Claude <noreply@anthropic.com>
1 parent d3e3431 commit 4ba33a2

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

.github/workflows/release.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,8 @@ jobs:
344344
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
345345
needs: [release, build_and_package_macos]
346346
runs-on: ubuntu-latest
347+
env:
348+
HOMEBREW_TAP_TOKEN: ${{ secrets.HOMEBREW_TAP_TOKEN }}
347349
steps:
348350
- name: Checkout code
349351
uses: actions/checkout@v4
@@ -366,11 +368,11 @@ jobs:
366368
path: dist/portable/x64
367369

368370
- name: Skip when tap token is unavailable
369-
if: secrets.HOMEBREW_TAP_TOKEN == ''
371+
if: env.HOMEBREW_TAP_TOKEN == ''
370372
run: echo "HOMEBREW_TAP_TOKEN is not set; skipping Homebrew tap update."
371373

372374
- name: Generate formula
373-
if: secrets.HOMEBREW_TAP_TOKEN != ''
375+
if: env.HOMEBREW_TAP_TOKEN != ''
374376
run: |
375377
VERSION="${{ needs.release.outputs.version }}"
376378
ARM64_SHA="$(awk '{print $1}' dist/portable/arm64/xcodebuildmcp-${VERSION}-darwin-arm64.tar.gz.sha256)"
@@ -382,9 +384,9 @@ jobs:
382384
--out dist/homebrew/Formula/xcodebuildmcp.rb
383385
384386
- name: Create pull request in tap repo
385-
if: secrets.HOMEBREW_TAP_TOKEN != ''
387+
if: env.HOMEBREW_TAP_TOKEN != ''
386388
env:
387-
GH_TOKEN: ${{ secrets.HOMEBREW_TAP_TOKEN }}
389+
GH_TOKEN: ${{ env.HOMEBREW_TAP_TOKEN }}
388390
run: |
389391
VERSION="${{ needs.release.outputs.version }}"
390392
BRANCH="xcodebuildmcp-v${VERSION}"

0 commit comments

Comments
 (0)