Just paste this function into your .bash_profile.
function vpub() {
npm version $1;
git push origin master;
npm publish;
}
Then you'll be able to do vpub patch/minor/major and it will:
Automatically increment the version number in package.json.
Tag your latest commit with the new version number.
Push