Skip to content

Commit ac1c289

Browse files
authored
Merge pull request #1020 from supertokens/fix/gha/publish-error
fix: release pipeline publish auth error
2 parents 8353a9a + a0460a0 commit ac1c289

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

.github/workflows/pipeline-release-tag.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,7 @@ jobs:
351351
352352
publish:
353353
runs-on: ubuntu-latest
354+
environment: publish
354355
needs:
355356
- setup
356357
- release
@@ -362,12 +363,17 @@ jobs:
362363
ref: ${{ needs.setup.outputs.releaseTag }}
363364
fetch-tags: true
364365

365-
- run: |
366-
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" >> ~/.npmrc
366+
- uses: actions/setup-node@v4
367+
with:
368+
node-version: "20"
369+
registry-url: "https://registry.npmjs.org/"
367370

371+
- run: |
368372
if [[ "${{ needs.merge.outputs.isLatest }}" == "true" ]]
369373
then
370374
npm publish --tag latest
371375
else
372376
npm publish --tag version-${{ needs.setup.outputs.packageVersion }}
373377
fi
378+
env:
379+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)