ietf-tools / semver-action

GitHub Action to calculate the next release version based on conventional commits
BSD 3-Clause "New" or "Revised" License
56 stars 22 forks source link

It is not incrementing in the correct version. #25

Closed dcorrea777 closed 1 year ago

dcorrea777 commented 1 year ago

I was testing your action in a test project of mine and I had a problem, but I don't know if it's necessarily from the action.

Assuming I have my main branch looking at version v1.0.0, now I need to release a new version but I need to keep this version v1.0.0.

For this scenario I go and create a new branch called v1, and all the features and references for that version I do through that branch. After that I can create a new commit with a "BREAK CHANGE" message to generate my new version and continue working on it.

But if I add a new resource from my v1 branch and it generates the new tags, it is incrementing in the v2 version: Example: v2.1 when it was supposed to be v1.1

NGPixel commented 1 year ago

Releases usually don't work from branches. You need to specify the from and to tag directly, otherwise it will use the latest one, no matter what the branch is.

dcorrea777 commented 1 year ago

I know releases aren't from branching, but their tags are. So soon the tag is not created correctly.

NGPixel commented 1 year ago

My mistake, I was looking at the wrong action behavior.

semver-action doesn't support your use case. The GitHub GraphQL API doesn't return any branch info for tags either, so it would be quite tricky to implement anyway.