Skip to content

Commit 47e5ece

Browse files
committed
ci: use built-in GITHUB_TOKEN to fix release workflow
The previous GITH_PACKAGE_TOKEN PAT was returning Bad credentials when softprops/action-gh-release tried to fetch/create the release. Switch to the built-in GITHUB_TOKEN, which is auto-rotated per run and only needs the existing 'contents: write' permission already declared at the workflow level.
1 parent 71b681d commit 47e5ece

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

.github/workflows/publish.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
11
name: Create GitHub Release
22

3+
# Use the built-in GITHUB_TOKEN; no custom PAT is required.
34
permissions:
45
contents: write
56

67
on:
7-
88
# Automatically create GitHub Release when a version tag is pushed.
99
# NPM publish is handled manually outside of CI (see scripts/release.sh).
1010
push:
1111
tags:
1212
- 'v*.*.*'
1313

14-
1514
jobs:
1615
release:
1716
runs-on: ubuntu-latest
@@ -23,12 +22,12 @@ jobs:
2322

2423
- name: Resolve version from tag
2524
run: echo "NEW_VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
26-
- name: Build changelog
2725

26+
- name: Build changelog
2827
id: build_changelog
2928
uses: mikepenz/release-changelog-builder-action@v4.1.1
3029
env:
31-
GITHUB_TOKEN: ${{ secrets.GITH_PACKAGE_TOKEN }}
30+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3231

3332
- name: Publish GitHub Release
3433
uses: softprops/action-gh-release@v1
@@ -38,4 +37,4 @@ jobs:
3837
body: ${{ steps.build_changelog.outputs.changelog }}
3938
prerelease: ${{ contains(env.NEW_VERSION, 'beta') || contains(env.NEW_VERSION, 'alpha') || contains(env.NEW_VERSION, 'rc') }}
4039
env:
41-
GITHUB_TOKEN: ${{ secrets.GITH_PACKAGE_TOKEN }}
40+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)