Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: allow the creation of tags without pushing #168

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dsayling
Copy link

@dsayling dsayling commented Feb 7, 2023

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 createTag with a boolean parameter to check if we need to push
    • async createRef moved into conditional check with additional debug log to indicate tag is not pushed.
  • Update action module to extract boolean input
    • Used getBooleanInput as opposed to getInput for better error handling from the actions core lib.
  • Updated existing unittests to verify true is default arg for pushTag param.
  • 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant