conventional-changelog-action: Question: Why could it not detect the next version number?

I use the action to generate the next version number but since the main branch is protected, I (am trying to) dry run it using the following steps and create a new branch where it updates the version number using the npm version command. However, it says, β€œThe version could not be detected, using fallback version β€˜0.1.0’.”. What am I doing wrong?

- name: Checkout
  uses: actions/checkout@v3
  with:
    fetch-depth: 0
    ref: "main"

- name: Get the next version
  id: next_version
  uses: TriPSs/conventional-changelog-action@v3
  with:
    github-token: ${{ secrets.github_token }}
    skip-commit: 'true'
    skip-tag: 'true'

This is the run log:

Run TriPSs/conventional-changelog-action@v3
Using "angular" preset
Using "chore(release): {version} [skip ci]" as commit message
Using "Conventional Changelog Action" as git user.name
Using "conventional.changelog.action@github.com" as git user.email
Using "5" release count
Using "./package.json" as version file
Using "version" as version path
Using "v" as tag prefix
Using "CHANGELOG.md" as output file
Using "" as config file
Using "github.com" as gitUrl
Using "main" as gitBranch
Using "" as gitPath
Skipping empty releases is "enabled"
Skipping the update of the version file is "disabled"
/usr/bin/git config user.name Conventional Changelog Action
/usr/bin/git config user.email conventional.changelog.action@github.com
/usr/bin/git remote set-url origin ***github.com/<MY REPO>
Pull to make sure we have the full git history
/usr/bin/git rev-parse --is-shallow-repository
false
/usr/bin/git pull --tags --ff-only
Already up to date.
Recommended release type: minor
Because: There are 0 BREAKING CHANGES and 3[29](https://github.com/<name of my repo>/actions/runs/6021386720/job/16334164675#step:3:30) features
Using GIT to determine the new version
The version could not be detected, using fallback version '0.1.0'.
Changelog generated
# 0.1.0 (2023-08-[30](https://github.com/<name of my repo>/actions/runs/6021386720/job/16334164675#step:3:31))

About this issue

  • Original URL
  • State: closed
  • Created 10 months ago
  • Comments: 15 (6 by maintainers)

Most upvoted comments

Hi, what you are looking for is the git-push: false option, this will skip pushing the tag/commit.

It cannot determine the version now since skip-tag is enabled.