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

Setting `noVersionBumpBehavior` to current still results in an error if there are no commits since latest tag #34

Closed ateix17 closed 9 months ago

ateix17 commented 11 months ago

👋 Hey there! I ran into a bit of a confusing edge case using this action: I set noVersionBumpBehavior to current in my github action, but when there are no commits since the latest tag, it exits with an error here rather than returning the current version as the readme led me to expect.

For context, if it's helpful, the flow that I'm using this for is for testing alpha versions. The workflow is that when contributors open PRs to the repo, our CI github action builds the project and publishes an artifact for each PR build to our artifactory that contributors can use to test with. My aim is to have this publish workflow publish the artifact as ${current}-alpha-${unique identifier} for a PR build and ${next} for a master build.

Not sure if this is a bug or if this particular workflow is just not supported by this action, but figured I would drop a note here regardless and ask if it'd make sense for noVersionBumpBehavior to also apply if there aren't new commits.

schmidtw commented 9 months ago

I am seeing a similar issue as well: https://github.com/goschtalt/.github/actions/runs/7416665692/job/20181995205

NGPixel commented 9 months ago

Added a new noNewCommitBehavior option to handle this behavior in v1.6.0.