fix(ci): enable automatic release workflow triggering (#1043)

* fix(ci): enable automatic release workflow triggering

- Use PAT_TOKEN instead of GITHUB_TOKEN in prepare-release.yml
  When GITHUB_TOKEN pushes a tag, GitHub prevents it from triggering
  other workflows (security feature to prevent infinite loops).
  PAT_TOKEN allows the tag push to trigger release.yml automatically.

- Change dry_run default to false in release.yml
  Manual workflow triggers should create real releases by default,
  not dry runs.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix(ci): add PAT_TOKEN validation with clear error message

Addresses Sentry review feedback - fail fast with actionable error
if PAT_TOKEN secret is not configured, instead of cryptic auth failure.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Andy
2026-01-15 20:56:55 +01:00
committed by GitHub
parent 18d9b6cfc1
commit 2ff9ccabfe
2 changed files with 15 additions and 2 deletions
+14 -1
View File
@@ -29,10 +29,23 @@ jobs:
should_release: ${{ steps.check.outputs.should_release }} should_release: ${{ steps.check.outputs.should_release }}
new_version: ${{ steps.check.outputs.new_version }} new_version: ${{ steps.check.outputs.new_version }}
steps: steps:
# Fail fast with clear error if PAT_TOKEN is not configured
- name: Validate PAT_TOKEN is configured
run: |
if [ -z "${{ secrets.PAT_TOKEN }}" ]; then
echo "::error::PAT_TOKEN secret is not configured."
echo "::error::This secret is required for automatic release triggering."
echo "::error::See https://github.com/AndyMik90/Auto-Claude/pull/1043 for setup instructions."
exit 1
fi
# IMPORTANT: Use PAT_TOKEN instead of GITHUB_TOKEN
# When GITHUB_TOKEN pushes a tag, it does NOT trigger other workflows (GitHub security feature)
# PAT_TOKEN allows the tag push to trigger release.yml automatically
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with: with:
fetch-depth: 0 fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }} token: ${{ secrets.PAT_TOKEN }}
- name: Get package version - name: Get package version
id: package id: package
+1 -1
View File
@@ -10,7 +10,7 @@ on:
dry_run: dry_run:
description: 'Test build without creating release' description: 'Test build without creating release'
required: false required: false
default: true default: false
type: boolean type: boolean
jobs: jobs: