Setup this as an .npmrc
in a consumer
always-auth=true
@github-org:registry=https://npm.pkg.github.com/github-org/
_authToken=TOKEN
//npm.pkg.github.com/:_authToken=TOKEN
github-org is your org name to scope your packages to TOKEN is a personal access token to allow for reading from package repository. You can generate a token here https://github.com/settings/tokens
You'll need a token for authenticating with your account if you have 2 factor auth on.
"auth": "npm login --registry=https://npm.pkg.github.com"
Add this to your package.json
of the thing you want deployed
"publishConfig": {
"registry": "https://npm.pkg.github.com/"
},
Setup name to be "name": "@github-org/packagename",
Once authed with github and that is in package.json run npm publish
.