Releases are published to NPM when a GitHub release is created.
- Checkout to a new release branch.
- Bump version with standard-version:
npm run release- Then push the changes to origin, with tags and open a PR.
git push --follow-tags origin- Merge the PR to main.
- Create a new GitHub release with the tag you just created.
- The CI will build and publish to npm.
To ignore the automatic version increase in favour of a custom version use the --release-as flag with the argument major, minor or patch or a specific version number:
npm run release -- --release-as minor
# Or
npm run release -- --release-as 1.1.0To create a pre-release run:
npm run release -- --prereleaseIf the lastest version is 1.0.0, the pre-release command will change the version to: 1.0.1-0
To name the pre-release, set the name by adding --prerelease <name>
npm run release -- --prerelease alphaIf the latest version is 1.0.0 this will change the version to: 1.0.1-alpha.0