Skip to content

Commit 31ee410

Browse files
committed
Update CI/CD workflow to use personal access token for authentication with GitHub Packages and semantic release
1 parent fb1ca4f commit 31ee410

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

.github/workflows/ci-cd.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ jobs:
2222
with:
2323
fetch-depth: 0
2424
persist-credentials: false
25+
token: ${{ secrets.PAT_TOKEN }}
2526

2627
- name: Setup Node.js for npm
2728
uses: actions/setup-node@v4
@@ -45,6 +46,7 @@ jobs:
4546
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
4647
env:
4748
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
49+
GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }}
4850
run: npx semantic-release
4951

5052
- name: Setup Node.js for GitHub Packages
@@ -57,7 +59,7 @@ jobs:
5759
- name: Publish to GitHub Packages
5860
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
5961
env:
60-
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
62+
NODE_AUTH_TOKEN: ${{ secrets.PAT_TOKEN }}
6163
run: |
6264
echo "//npm.pkg.github.com/:_authToken=${NODE_AUTH_TOKEN}" > .npmrc
6365
echo "@nginh:registry=https://npm.pkg.github.com" >> .npmrc

0 commit comments

Comments
 (0)