diff --git a/.github/workflows/prepare-release.yml b/.github/workflows/prepare-release.yml index 2289bad1..e304fac0 100644 --- a/.github/workflows/prepare-release.yml +++ b/.github/workflows/prepare-release.yml @@ -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 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 59f1be14..9afdb20a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -10,7 +10,7 @@ on: dry_run: description: 'Test build without creating release' required: false - default: true + default: false type: boolean jobs: