Skip to content

Commit f7c5923

Browse files
gaborbernatclaude
andcommitted
fix(release): pass GH_TOKEN to release process for gh CLI auth
The release script uses 'gh release create' to create GitHub releases, but the workflow wasn't providing authentication. This caused the release to fail with 'gh auth login' error. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 96a40f2 commit f7c5923

1 file changed

Lines changed: 5 additions & 8 deletions

File tree

.github/workflows/prepare-release.yaml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
- uses: actions/checkout@v6
3030
with:
3131
fetch-depth: 0
32-
token: ${{ secrets.RELEASE_PAT || secrets.GITHUB_TOKEN }}
32+
token: ${{ secrets.RELEASE_PAT }}
3333

3434
- name: Install the latest version of uv
3535
uses: astral-sh/setup-uv@v7
@@ -40,13 +40,8 @@ jobs:
4040

4141
- name: Configure git
4242
run: |
43-
if [ -n "${{ secrets.RELEASE_PAT }}" ]; then
44-
git config user.name "${{ github.actor }}"
45-
git config user.email "${{ github.actor }}@users.noreply.github.com"
46-
else
47-
git config user.name "github-actions[bot]"
48-
git config user.email "github-actions[bot]@users.noreply.github.com"
49-
fi
43+
git config user.name "${{ github.actor }}"
44+
git config user.email "${{ github.actor }}@users.noreply.github.com"
5045
5146
- name: Set up remote tracking
5247
run: |
@@ -94,6 +89,8 @@ jobs:
9489

9590
- name: Run release process
9691
run: tox run -e release -- ${{ steps.version.outputs.version }}
92+
env:
93+
GH_TOKEN: ${{ secrets.RELEASE_PAT }}
9794

9895
- name: Display completion message
9996
run: echo "Release ${{ steps.version.outputs.version }} prepared and pushed successfully!"

0 commit comments

Comments
 (0)