conventional-changelog-action: Wrong version bumping while digit count increasing.

From action point of view, after version v0.10.0 we should use v0.9.2 tag for next version:

...
 /usr/bin/git pull --unshallow --tags --ff-only
From https://github.com/IATkachenko/HA-YandexWeather
 * [new tag]         v0.1.0     -> v0.1.0
 * [new tag]         v0.10.0    -> v0.10.0
 * [new tag]         v0.2.0     -> v0.2.0
 * [new tag]         v0.3.0     -> v0.3.0
 * [new tag]         v0.4.0     -> v0.4.0
 * [new tag]         v0.4.1     -> v0.4.1
 * [new tag]         v0.4.2     -> v0.4.2
 * [new tag]         v0.4.3     -> v0.4.3
 * [new tag]         v0.4.4     -> v0.4.4
 * [new tag]         v0.5.0     -> v0.5.0
 * [new tag]         v0.5.1     -> v0.5.1
 * [new tag]         v0.6.0     -> v0.6.0
 * [new tag]         v0.7.0     -> v0.7.0
 * [new tag]         v0.8.0     -> v0.8.0
 * [new tag]         v0.8.1     -> v0.8.1
 * [new tag]         v0.9.0     -> v0.9.0
 * [new tag]         v0.9.1     -> v0.9.1
Already up to date.
Recommended release type: patch
Because: There are 0 BREAKING CHANGES and 0 features
Using GIT to determine the new version
Changelog generated
## [0.9.2](https://github.com/IATkachenko/HA-YandexWeather/compare/v0.9.1...v0.9.2) (2022-07-02)
...

So, I have to remove all previous releases to release v0.10.1

Workflow config is:

jobs:
  changes:
    name: "Create changelog and tag"
    runs-on: ubuntu-latest
    outputs:
      skipped: ${{ steps.changelog.outputs.skipped }}
      clean_changelog: ${{ steps.changelog.outputs.clean_changelog }}
      tag: ${{ steps.changelog.outputs.tag }}

    steps:
      - name: checkout
        uses: actions/checkout@v2
        id: checkout

      - name: Conventional Changelog Action
        id: changelog
        uses: TriPSs/conventional-changelog-action@v3
        with:
          github-token: ${{ secrets.github_token }}
          output-file: "false"
          skip-version-file: "true"
          skip-commit: "true"

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 17 (6 by maintainers)

Commits related to this issue

Most upvoted comments

Are there no plans to take a stab on this issue?

my CI/merge pipeline was opinionated toward pushing commits to each new git tag which don’t exist on the main branch. removing this logic and only tagging the commit from the main branch seems to have solved my issue.

i was able to debug locally by using a combination of

git fetch --tags -f
git tag -fa v1.2.1 main -m "chore: release 1.2.1"
npm install -g git-semver-tags
git-semver-tags

and

git log --decorate |grep tag

@IATkachenko you might be experiencing the same issue because of the additional commit/tagging logic in your workflow

git-semver-tags is used to get all the tags, this should return the tags in order of creation, apparently that is not so so I think we need to sort the fetched tags ourself and then get the highest one.