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:
@@ -29,10 +29,23 @@ jobs:
|
||||
should_release: ${{ steps.check.outputs.should_release }}
|
||||
new_version: ${{ steps.check.outputs.new_version }}
|
||||
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
|
||||
with:
|
||||
fetch-depth: 0
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
token: ${{ secrets.PAT_TOKEN }}
|
||||
|
||||
- name: Get package version
|
||||
id: package
|
||||
|
||||
@@ -10,7 +10,7 @@ on:
|
||||
dry_run:
|
||||
description: 'Test build without creating release'
|
||||
required: false
|
||||
default: true
|
||||
default: false
|
||||
type: boolean
|
||||
|
||||
jobs:
|
||||
|
||||
Reference in New Issue
Block a user