mathieudutour / mathieudutour/github-tag-action
Prerelease does not Respect Default_Bump
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 733
- Forks
- 227
- PR merge metrics
- No merged PRs in 30d
Description
When having `default_bump=minor` I would expect a prerelease to do a minor update when creating the prerelease version. Currently it always does a patch update.
E.g.
latest release is `1.2.3`, I would expect an execution of the action on a branch basing from that version, with parameters `default_bump=minor` and `default_prerelease_bump=prerelease` to generate the version `1.3.0-beta.0`, since 1.3.0 is the version the final release will (most likely) be.
Instead, it currently generates the version `1.2.4-beta.0`, which is a patch increase.
Another run on top should then do the correct prerelease update to create version `1.3.0-beta.1`
I think adjustments need to address the code starting at
https://github.com/mathieudutour/github-tag-action/blob/e923a6115f1a2ccc3404e26ec2535092a9fd5536/src/action.ts#L155
You could argue that this is a bug/feature of semver itself, but it really is relating to correctly interpreting default actions which is responsibility of this module, not semver.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in src/action.ts around line 155 and reproduce the action with default_bump=minor and default_prerelease_bump=prerelease from version 1.2.3. The fix is done when the first prerelease is 1.3.0-beta.0 and a subsequent run produces 1.3.0-beta.1 rather than patch-based versions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions, typescript
- Domain
- ci-cd, release
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100