Skip to content

Commit 0566fea

Browse files
committed
fix: use second setup-node before publish to correctly wire NODE_AUTH_TOKEN
1 parent 8ebc351 commit 0566fea

2 files changed

Lines changed: 7 additions & 5 deletions

File tree

.github/workflows/release.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,9 @@ jobs:
3434
uses: actions/setup-node@v4
3535
with:
3636
node-version: 20
37-
registry-url: https://npm.pkg.github.com
38-
scope: "@backendworks"
3937

4038
- name: Install dependencies
4139
run: yarn install --frozen-lockfile
42-
env:
43-
NODE_AUTH_TOKEN: ${{ secrets.GH_TOKEN }}
4440

4541
- name: Generate Prisma client
4642
run: npx prisma generate
@@ -80,6 +76,13 @@ jobs:
8076
env:
8177
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8278

79+
- name: Setup Node for publish
80+
uses: actions/setup-node@v4
81+
with:
82+
node-version: 20
83+
registry-url: https://npm.pkg.github.com
84+
scope: "@backendworks"
85+
8386
- name: Publish to GitHub Packages
8487
run: npm publish
8588
env:

.npmrc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
# GitHub Packages registry for @backendworks scope
22
@backendworks:registry=https://npm.pkg.github.com
3-
//npm.pkg.github.com/:_authToken=${NODE_AUTH_TOKEN}

0 commit comments

Comments
 (0)