- Notifications
You must be signed in to change notification settings - Fork 8
Add bump-version and tag-version scripts #32
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
Conversation
bump-version/action.yml Outdated
| if [ ${{ inputs.dry_run }} != "true" ]; then | ||
| git push origin | ||
| echo "### Version bump: ${{inputs.version}}" >> $GITHUB_STEP_SUMMARY | ||
| else | ||
| echo "### Version bump : ${{inputs.version}}" >> $GITHUB_STEP_SUMMARY | ||
| fi No newline at end of file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be simplified if you want to print the same message in both cases:
| if [ ${{ inputs.dry_run }} != "true" ]; then | |
| git push origin | |
| echo "### Version bump: ${{inputs.version}}" >> $GITHUB_STEP_SUMMARY | |
| else | |
| echo "### Version bump : ${{inputs.version}}" >> $GITHUB_STEP_SUMMARY | |
| fi | |
| if [ ${{ inputs.dry_run }} != "true" ]; then | |
| git push origin | |
| fi | |
| echo "### Version bump: ${{inputs.version}}" >> $GITHUB_STEP_SUMMARY |
Alternatively, consider using a different message here as you've done in the tag-version action.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated
bump-version/action.yml Outdated
| dry_run: | ||
| description: Whether this is a dry run | ||
| required: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about naming this push_commit since that's what it does?
Context: in the PHP repositories, I don't want to push right away since we merge the changes to another branch so our merge-up automation doesn't pick up these changes (as they would conflict anyways)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
tag-version/action.yml Outdated
| tag_message_template: | ||
| description: The template for the git tag message | ||
| default: "BUMP ${VERSION}" | ||
| dry_run: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar to the above, how about naming this push_tag?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
bump-version/action.yml Outdated
| - name: Push the commit to the source branch | ||
| shell: bash -eux {0} | ||
| run: | | ||
| if [ ${{ inputs.push_commit }} != "true" ]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The logic is backwards, resulting in a push when push_commit is set to false ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated
tag-version/action.yml Outdated
| - name: Push the tag to the source branch | ||
| shell: bash -eux {0} | ||
| run: | | ||
| if [ ${{ inputs.push_tag }} != "true" ]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here - the check needs to change
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missed two docs changes in my last review, but LGTM other than that.
Co-authored-by: Andreas Braun <git@alcaeus.org>
Co-authored-by: Andreas Braun <git@alcaeus.org>
Co-authored-by: Andreas Braun <git@alcaeus.org>
Co-authored-by: Andreas Braun <git@alcaeus.org>
Tested with https://github.com/blink1073/winkerberos/actions/runs/9451163300