This document describes the process for creating a release and publishing a new version of this module.
- Bump the version number in
package.json
. Use Semantic Versioning. - Run
npm install
to regenerate thepackage-lock.json
. - Run
npm run build
. It's important to do this after bumping the version. - Commit and Git tag these changes. Use
v
followed by the version number, for example:git tag -a v0.8.2
. - Push the changes to the GitHub repository, including the tag (
git push --tags
). Open and merge PRs as appropriate. - Once the changes are merged to
master
, create a new Release on GitHub and choose the tag you just created. - Publishing a release triggers the GitHub Action Publish to npm which will release the new npm package automatically. Ensure the Action completes successfully.
New updates can be viewed at the npm package page: @sophos-factory/api-client
-
Do steps 1-4 above.
-
Ensure you have the correct npm credentials set up locally.
-
Publish the pre-release using
npm publish
and ensure you pass the pre-release--tag
. For example:npm publish --tag pre-release --access public