Skip to content

Commit 27d6716

Browse files
committed
Allow true semenatic versioning when bumping major and minor tags manually
1 parent aa12a49 commit 27d6716

1 file changed

Lines changed: 2 additions & 7 deletions

File tree

.github/workflows/tag.yml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,8 @@ jobs:
4242
GH_TOKEN: ${{ steps.app-token.outputs.token }}
4343
REPOSITORY: ${{ github.repository }}
4444
run: |
45-
# Find the latest minor version tag (vX.Y format - exactly 2 parts)
46-
LATEST_TAG=$(git tag --list 'v[0-9]*.[0-9]*' --sort=-v:refname | grep -E '^v[0-9]+\.[0-9]+$' | head -1)
47-
48-
# Fall back to vX.Y.0 format if no vX.Y tags exist (backward compat)
49-
if [ -z "$LATEST_TAG" ]; then
50-
LATEST_TAG=$(git tag --list 'v[0-9]*.[0-9]*.0' --sort=-v:refname | head -1)
51-
fi
45+
# Find the latest base version tag (vX.Y or vX.Y.0 format)
46+
LATEST_TAG=$(git tag --list 'v[0-9]*.[0-9]*' --sort=-v:refname | grep -E '^v[0-9]+\.[0-9]+(\.0)?$' | head -1)
5247
5348
if [ -z "$LATEST_TAG" ]; then
5449
echo "No version tag found. Create one with: git tag v0.15 && git push origin v0.15"

0 commit comments

Comments
 (0)