npmjs Automation Tokens

As described here npm automation tokens | GitHub Changelog, Automation Tokens are useful in CI/CD to bypass 2FA during npm publish .

I found it easy to create one; however, I can’t find any tutorials on how to actually use the token. Help?

Found the answer by searching the Internet for npm auth token.

Put inside ~/.npmrc

//registry.npmjs.org/:_authToken=your_auth_token

I couldn’t figure out how to get this to work with yarn npm publish, so I’m sticking to npm publish.