Publishing¶
Releases are published to GitHub Packages as @subscribed-aps/subscribed-cli. The package is private (access: restricted) and can only be installed by users with a GitHub token that has read:packages access to the subscribed-aps org.
Prerequisites¶
A GitHub personal access token with the write:packages scope, added to your ~/.npmrc:
@subscribed-aps:registry=https://npm.pkg.github.com
//npm.pkg.github.com/:_authToken=YOUR_GITHUB_TOKEN
Steps¶
- Bump the version in
package.jsonfollowing semver: patch(0.1.x) — bug fixesminor(0.x.0) — new commands or features, backwards compatiblemajor(x.0.0) — breaking changes
- Build to make sure the compiled output is up to date:
- Publish:
- Verify the new version appears at:
https://github.com/orgs/subscribed-aps/packages?repo_name=tools-package-subscribed-cli
Notes¶
npm versionautomatically creates a git commit and tag. Push both:git push && git push --tags.- Never publish from a feature branch — always publish from
mainafter the PR is merged. - The
preparescript (npm run build) runs automatically before publish, so thedist/output is always current.