Because I always forget how this stuff works.
This document uses alpha
for snapshot prefixing, but feel free to replace it with beta
or any other word that suits your development cycle.
npm version premajor|preminor|prepatch --preid=alpha
- increases the major|minor|patch version with a-alpha.0
prefixgit push --follow-tags
npm publish --tag alpha.0
npm version prerelease --preid=alpha
- increases the number only in the-alpha.0
prefix [1]git push --follow-tags
npm publish --tag alpha.0
<-- replace the0
with the number you got fromnpm version
in step 1
Tip: the current version can be printed out with this command: node -p "require('./package.json').version"
[2]
npm i <your-package>@14.0.0-alpha.2
npm version major|minor|patch
- similarly to how it was done in the first development snapshotgit push --follow-tags
npm publish
- Go to github and create a new release