Auto-push to upstream repository on npm version update

When you publish a new version of your package on with npm version, you can automatically push the version upgrade to your upstream repository as well - thanks to npm scripts!

Add a npm script postversion: git push --follow-tags and you are good to go.

Whenever you made a npm version major, npm version minor, or npm version patch, a new commit will be added to your upstream repository as well, mentioning this version upgrade.

Check this out - it has a freeCodeCamp blog link for a primer on npm scripts!


comments powered by Disqus