Skip to content

Commit

Permalink
Fix npm publishing
Browse files Browse the repository at this point in the history
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
  • Loading branch information
jasonkarns committed Nov 29, 2019
1 parent 3df1924 commit 1d75951
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/release.yml
Expand Up @@ -33,6 +33,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
scope: '@nodenv'
registry-url: 'https://registry.npmjs.org'
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 comments on commit 1d75951

Please sign in to comment.