This instruction is to register the library to GPR privately under the certain organization, like @org/lib
.
- package.json
{
"name": "@org/lib",
"repository": {
"type": "git",
"url": "https://github.com/org/lib.git"
},
"publishConfig": {
"registry": "https://npm.pkg.github.com/"
},
- CI job
-
Version bump
yarn version --major
Depending on what version you're bumping, it can be different params, like (
--minor
or--patch
) -
Publish to GPR (GitHub Packages Registry)
yarn publish . --tag latest
- NPM/yarn configurations
-
.npmrc
//npm.pkg.github.com/:_authToken=${NODE_AUTH_TOKEN} always-auth=true
-
.yarnrc
"@org:registry" "https://npm.pkg.github.com"