npm-publish-by-tag
Script for publishing to NPM based on tagged git commit
Usage
-
Update the version in the
package.json
file and commit the change. -
Tag the commit with a semver version.
-
Push changes, with the tags
-
On the CI server:
npm install @tepez/npm-publish-by-tag@latest
node node_modules/@tepez/npm-publish-by-tag
Notes
- This tool should be used with npm update or an alternative such as np.
If you use np, make sure to include the --no-publish
flag since the publishing is going to be done from the CI server.
For instance, this package uses np when calling npm run update
.
- Initial publish to NPM has to be done manually.