phips28 / gh-action-bump-version

GitHub Action for automated npm version bump.
MIT License
336 stars 249 forks source link

feature: npm version output parsing to allow version hooks #232

Closed mattanglin closed 8 months ago

mattanglin commented 9 months ago

Type of Change

What does it do?

Currently this action takes the output from running npm version... to directly parse the new version number. This PR updates the way this output is parsed to get the version number from the last line of output so that any preversion/version/postversion hooks can be run without their output affecting the parsed version number.

Example output with postversion hook:

$ npm version patch
> postversion
> echo 'just running another script of sorts here...'

just running another script of sorts here...
v10.1.2
phips28 commented 8 months ago

@mattanglin is this PR causing this: https://github.com/phips28/gh-action-bump-version/issues/237#issuecomment-1927667470 ? Can you check pls and maybe help to fix it?