Skip to content

Is it possible to automatically bump minor version if executed from main and patch if executed from other branches? #167

Answered by PaulHatch
eptw4by asked this question in Q&A
Discussion options

You must be logged in to vote

In general this action looks at commits and not branch names, the only exception being when the "version from branch" option is enabled. You can create multiple GitHub Actions workflows for different branches:

on:
  push:
    branches:
      - master

You could also just check the branch name in the action itself with some custom code and pass the configuration variables into the action.

At the moment there is not a clean way to override the type of commit. You could set up the action that runs on the master branch with a minor_pattern that always matches, but you'd need to set a tag in that case if you want that to reflect on both branches because if you used bump_each_commit each branch…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@eptw4by
Comment options

Answer selected by eptw4by
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants