Original bug ticket: [https://npm.community/t/9083](https://npm.community/t/9083)
Originally filed: 2019-07-25T08:28:56.509Z
I experience this problem as well.
Is there a workaround except manually doing the commit and setting the tag? Especially setting the tag is cumbersome as I need to extract the version from package.json and eventually take tag-version-prefix setting into account.
Some solution alternatives I could think of:
Workaround: create a postversion.sh file with following content and call it from npm script postversion:
git add package.json
git commit -m "chore: Bump version to $npm_package_version"
git tag -a $npm_config_tag_version_prefix$npm_package_version -m "$npm_package_version"
git push --follow-tags
npm sets up the environment variables npm_package_version and npm_config_tag_version_prefix automatically; which I can then use for commit message and tag name and annotation.
Most helpful comment
Workaround: create a postversion.sh file with following content and call it from npm script postversion:
npm sets up the environment variables npm_package_version and npm_config_tag_version_prefix automatically; which I can then use for commit message and tag name and annotation.