GitHubFlow workflow isn't bumping versions #4166
-
Prerequisites
GitVersion packageGitVersion.Tool GitVersion version6.0.2 Operating systemLinux, macOS What are you seeing?BackgroundI have a class library. With our ci/cd pipeline for prs we test, build, and publish that nuget package to a snapshot nuget repo. We use conventional commits to bump versions based on commit messages. Things have upgraded with the library since the docs have provided guidance on conventional commits and I don't think mainline mode is supported anymore Our config workflow: GitHubFlow/v1
major-version-bump-message: "^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test|config)(\\([\\w\\s-,/\\\\]*\\))?(!:|:.*\\n\\n((.+\\n)+\\n)?BREAKING CHANGE:\\s.+)"
minor-version-bump-message: "^(feat)(\\([\\w\\s-,/\\\\]*\\))?:"
patch-version-bump-message: "^(fix|perf|config|refactor|chore)(\\([\\w\\s-,/\\\\]*\\))?:"
ignore:
sha: [] IssueI can't get the minor/patch to increment for my life on a feature branch. I have tried removing my bump-message overrides to just the default What is expected?If I write a commit message like If I'm thinking of this workflow incorrectly then let me know, but how can I get these major/patch increments to work. Steps to Reproducehave 6.0.2 installed as a dotnet tool RepositoryFixture TestNo response Output log or link to your CI build (if appropriate).No response |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Please only create a bug report if you are sure, you found a bug. Have you invested any time to find out the root cause by yourself or do you just created a issue after you faced a problem?
Link[1]: Create feature branch from develop Link[2]: https://regex101.com/ I would recommend you to start with the a simple workflow and use the default message bump regex before changing it. |
Beta Was this translation helpful? Give feedback.
-
Yeah I think it's just the tags I was missing. I didn't want to have to add a tag until I actually went in and made a release in github. So I've adjusted my build automation to push a tag out after merging to main. As for bumping patch versions I can just change my workflow around. I was expecting to be able to bump the patch multiple times while working on a feature branch, but honestly one patch bump when I branch off of main makes sense and I can live with it. |
Beta Was this translation helpful? Give feedback.
Yeah I think it's just the tags I was missing. I didn't want to have to add a tag until I actually went in and made a release in github.
However, it's probably more performant to just look at the last tag on the main branch rather than parsing out all the git commit messages from all time.
So I've adjusted my build automation to push a tag out after merging to main.
As for bumping patch versions I can just change my workflow around. I was expecting to be able to bump the patch multiple times while working on a feature branch, but honestly one patch bump when I branch off of main makes sense and I can live with it.