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

Feture Request #21

Open
bjornbouetsmith opened this issue Sep 29, 2022 · 5 comments
Open

Feture Request #21

bjornbouetsmith opened this issue Sep 29, 2022 · 5 comments
Labels
enhancement New feature or request

Comments

@bjornbouetsmith
Copy link

Hi,

Would it be possible for you to make two changes:

  1. Make commiting optional
  2. Make it possible to modify the commit message

I usally commit version updates with a message similar to:
"Update version to 1.2.3"

But the message in this seems to be hardcoded and is not really ideal in my opinion.

I like that you update versions in a file pattern of files and not just a single file, which many of the other "bump" version action does - but because I cannot customize the commit message - or turn it off - I cannot use this.

Onbiously it would require that you add a couple of variables - one for controlling whether or not to commit - and another one where a "template can be set for a commit message" - but the easiest would be to make it possible to turn off committing - then people can just add their own - provided you give the version you updated to in outputs for your action.

run: |
  git commit -m "updated version to ${{ steps.update_version.outputs.updated_version }}"
  git push

Thank you

@SiqiLu
Copy link
Owner

SiqiLu commented Oct 3, 2022

Hi Bjørn Smith,
If you leave the github_token option as default or empty string, the action will not push any changes to your repository. So you can use this option to achieve what you need.
Later, I will improve the documentation to remind everyone that this solution can be used to implement avoiding pushing commits after updating the version. As mentioned in your question, it is possible to implement a custom commit message by subsequently executing the 'git commit -m' and 'git push' commands. So for the time being you can use this method to customize commits.
In subsequent releases, new options like message template will be provided to allow you to customize the submission message.

Thanks for your issue.

@SiqiLu SiqiLu added the enhancement New feature or request label Oct 3, 2022
@bjornbouetsmith
Copy link
Author

Hi Bjørn Smith, If you leave the github_token option as default or empty string, the action will not push any changes to your repository.

That is nice - but is there any way to get the incremented version back from the action, so I do not have to find it in the updated .csproj files?

@SiqiLu
Copy link
Owner

SiqiLu commented Oct 3, 2022

Maybe I can store the incremented version in a variable of the action. I will have a try.

@bjornbouetsmith
Copy link
Author

Maybe I can store the incremented version in a variable of the action. I will have a try.

I know actions can have outputs, so thats one way of refering it from the outside.

Thanks

@rfriend-zilo
Copy link

Be good if it could also tag the version :)

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

No branches or pull requests

3 participants