Skip to content

Commit 1d75951

Browse files
committed
Fix npm publishing
Npm's CLI is broken because it doesn't respect the auth token being provided via the environment when publishing despite npm/cli#8 GitHub's node action is broken because it doesn't respect the scope and registry config as provided via package.json. And npmjs.org registry is broken because it doesn't support named tokens, nor tokens that skip OTP. Ergo, in order to publish via github actions, my user profile 2fa must be downgraded to auth-only and the package 2fa must be disabled. OMFG
1 parent 3df1924 commit 1d75951

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

.github/workflows/release.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ jobs:
3333
runs-on: ubuntu-latest
3434
steps:
3535
- uses: actions/checkout@v1
36+
- uses: actions/setup-node@v1
37+
with:
38+
scope: '@nodenv'
39+
registry-url: 'https://registry.npmjs.org'
3640
- run: npm publish
3741
env:
3842
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)