In package.json
, I usually use a postversion
hook to publish to npm. Here we want to do the same thing, but we need to use a secret key because this is a private package.
In the repo's .env
file, add the secret key. This file is ignored in git
.
NPM_TOKEN="ghp_xxxxx"