From 1271d951cbb6a1ec2940e99d12015b6459a78aaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eike=20Ha=C3=9F?= Date: Mon, 21 Mar 2022 18:08:14 +0100 Subject: [PATCH] use npm token for prepublish (#741) --- .github/actions/publish/publish-stronghold-nodejs/action.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/actions/publish/publish-stronghold-nodejs/action.yml b/.github/actions/publish/publish-stronghold-nodejs/action.yml index 7f4a5151c3..fb99885f6f 100644 --- a/.github/actions/publish/publish-stronghold-nodejs/action.yml +++ b/.github/actions/publish/publish-stronghold-nodejs/action.yml @@ -52,4 +52,6 @@ runs: env: NODE_AUTH_TOKEN: ${{ inputs.npm-token }} # will publish 'latest' tag if no tag is passed - run: npm publish $(if [ ${{ inputs.tag }} != '' ]; then echo --tag ${{ inputs.tag }}; fi) --access public + run: | + echo "//registry.npmjs.org/:_authToken=${{ inputs.npm-token }}" >> ~/.npmrc + npm publish $(if [ ${{ inputs.tag }} != '' ]; then echo --tag ${{ inputs.tag }}; fi) --access public