github-tag-action
github-tag-action copied to clipboard
feat: allow the creation of tags without pushing
Changes
- Add an optional input into the action.yaml to allow users to create a tag without pushing.
- Default value is true, set to false to not push the tag.
- Update
createTagwith a boolean parameter to check if we need to push- async
createRefmoved into conditional check with additional debug log to indicate tag is not pushed.
- async
- Update
actionmodule to extract boolean input- Used
getBooleanInputas opposed togetInputfor better error handling from the actions core lib.
- Used
- Updated existing unittests to verify
trueis default arg forpushTagparam. - New unittest for the input set to false explicitly.
- Update README with section on using the input.
Reasoning
In some cases it might be useful for a user to create a tag based on the current versioning without pushing the tag. For example, in python's setuptools_scm or poetry-dynamic-versioning, a 'dev' or 'prerelease' tag is created by the versioning library based on the current tag. By default, these libraries create a subminor version release and do no commit parsing - only tags - so it's up to the user to bump a minor or major version in the tag.
In a pull_request workflow, before the merge to the default branch, this action could be used to create a local tag so the build process can create a dev version that reflects any api change in the pull request.