use npm token for prepublish
@@ -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
