From f6d52c8825aaf8989714eb2d90dcea44d8a5302d Mon Sep 17 00:00:00 2001 From: Hovhannes Sergoyan Date: Thu, 11 Jul 2024 18:39:43 +0400 Subject: [PATCH] set auth token in npmrc --- .github/workflows/publish.yml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 51d7ad7..de22fee 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -25,11 +25,7 @@ jobs: run: npm run build - name: Publish package to GitHub Package Registry - run: npm publish --registry=https://npm.pkg.github.com - env: - NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: echo //npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }} > .npmrc && npm publish --registry=https://npm.pkg.github.com - name: Publish package to NPM - run: npm publish --registry=https://registry.npmjs.org - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + run: echo //registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }} > .npmrc && npm publish --registry=https://registry.npmjs.org