feat: allow the creation of tags without pushing #168
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes
createTag
with a boolean parameter to check if we need to pushcreateRef
moved into conditional check with additional debug log to indicate tag is not pushed.action
module to extract boolean inputgetBooleanInput
as opposed togetInput
for better error handling from the actions core lib.true
is default arg forpushTag
param.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.