Why does semantic-version always return the same version number? #192701
Replies: 1 comment
-
|
Two things are going on. First, how Second, the self-hosted runner part is probably biting you. Try this: - name: Checkout files
- uses: actions/checkout@v4
- with:
- fetch-depth: 0
- fetch-tags: true
- clean: true
- name: Make sure tags are fresh
- shell: bash
- run: |
- git fetch --tags --force --prune
- git tag --list 'v*' --sort=-v:refname | head -5
- ```
Keep that `git tag --list` step for a few runs, it tells you exactly which tag paulhatch treats as the baseline. If it keeps showing `v1.0.2` when you expect `v1.0.3` to be there, the release step from the previous run didn't actually push the tag. Check that the workflow has `permissions: contents: write` at the job or workflow level, otherwise `softprops/action-gh-release` fails to create the release and tag.
Side note: `actions/checkout@v6` isn't a real tag, the current stable is `v4`. That was probably a typo.
Last thing, your patterns match the literal strings `MAJOR` and `MINOR` in commit messages. If none of your commits contain those words you'll never bump past patch, which is often how people end up stuck at `v1.0.x`. Conventional commits with matching patterns (like `^feat:` for minor, `BREAKING CHANGE` for major) tends to be cleaner.
Drop the workflow run log here if it's still stuck after the tag-fetch fix. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
🏷️ Discussion Type
Question
💬 Feature/Topic Area
Workflow Configuration
Discussion Details
I'm trying to get a new semantic version to apply when creating a new tag/release. I thought that paulhatch/semantic-version and softprops/action-gh-release would work. But every time I run the workflow I've made for it, it always gets the same semantic version number and applies it over and over again. In this case semantic version number v1.0.3. What am I doing wrong? Here's the YAML:
Beta Was this translation helpful? Give feedback.
All reactions