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

Which part of the version to bump #1

Open
toby-coleman opened this issue Mar 23, 2021 · 4 comments
Open

Which part of the version to bump #1

toby-coleman opened this issue Mar 23, 2021 · 4 comments

Comments

@toby-coleman
Copy link

How should I control which part of the version is bumped when using this action, i.e. major/minor/patch?

Would be good to add an example to the README showing how.

@florisla
Copy link

This is controlled in the configuration file bumpversion.cfg. See https://pypi.org/project/bump2version/

@jmrodriguez-lab
Copy link

jmrodriguez-lab commented Jul 15, 2022

From what I've read it is not. You need to specify whether this change is a mayor / minor / patch, etc...
This is usually done by adding some hashtag in the commit text (namely #patch, #major, #minor or by using conventional commits, etc). 🤔

Anyway, an example of how to configure it would be nice! :-)

@chanhosuh
Copy link

You would have to do something like the following:

    - name: FragileTech/bump-version
      uses: FragileTech/bump-version@main
      with:
        current_version: "${{ env.current_version }}"
        files: version.md
        commit_name: Your Company Bot
        commit_email: bot@your-company.com
        login: your-bot-login
        token: "${{ secrets.BOT_TOKEN }}"
        part: "${{ env.part }}"

Notice the last line. part is in fact an input to the action code; by default the code assumes it is "patch". You can use a previous step to parse it out of the commit message as the previous poster suggests and then store it as an env arg.

@chanhosuh
Copy link

More work than I think I want to do at the moment, but the maintainer of this other action does it this way: https://github.com/jaumann/github-bumpversion-action/blob/master/entrypoint.sh

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

No branches or pull requests

4 participants