Closed
Description
I have a workflow like this that's supposed to publish to npm once I publish to GPR:
name: Publish to npm
on: registry_package
jobs:
publish-npm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 12
registry-url: https://registry.npmjs.org/
- run: npm install && npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
I have the npm_token
secret added to this repository.
When I just published to GPR, it kicked off this workflow job, but it failed at the last step of publishing to npm. The error was from npm saying:
npm ERR! code E401
npm ERR! Unable to authenticate, need: Basic realm="GitHub Package Registry"
What does this error mean, and how do I fix it? I don't see anything about setting "basic realm" in the recipes for this setup-node
action.