Skip to content

Commit 73ec704

Browse files
Revert removing npm config set when npm publishing
We followed the [documentation](https://github.com/actions/setup-node/blob/main/docs/advanced-usage.md#publish-to-npmjs-and-gpr-with-npm) but got an `ENEEDAUTH` error. With the `npm config set` approach we got a 404 instead, which suggests a wrong API key. However, we know the API key was correct, so the other option was having conflicting ways to configure publishing (`NODE_AUTH_TOKEN` and `npm config set` were both present), or a string interpolation issue (there were no spaces inside the braces). This commit implements only a single way to configure the auth token.
1 parent c9fe59d commit 73ec704

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

.github/workflows/npmpublish.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ jobs:
1515
node-version: 18.x
1616
registry-url: 'https://registry.npmjs.org'
1717
- run: |
18+
npm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_ADYEN_NODE_API_LIBRARY_TOKEN }}
1819
npm install
1920
npm run build
2021
- run: npm publish
21-
env:
22-
NODE_AUTH_TOKEN: ${{ secrets.NPM_ADYEN_NODE_API_LIBRARY_TOKEN }}

0 commit comments

Comments
 (0)