Skip to content

Commit d1aceb3

Browse files
committed
🐛 Fix version detection to filter semver tags only
Replace git describe with explicit semver pattern matching (v[0-9]*.[0-9]*. [0-9]*) to exclude non-standard tags like v2. The previous approach could select major-only tags which lack patch/minor components, breaking downstream version parsing.
1 parent b4823bc commit d1aceb3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ jobs:
6565
- name: "🔍 Determine version"
6666
id: version
6767
run: |
68-
# Get the latest git tag as the "current" version for changelog
69-
CURRENT_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "")
68+
# Get the latest semver tag (v*.*.* format), excluding major-only tags like v2
69+
CURRENT_TAG=$(git tag -l 'v[0-9]*.[0-9]*.[0-9]*' --sort=-v:refname | head -n1)
7070
if [[ -n "$CURRENT_TAG" ]]; then
7171
CURRENT="${CURRENT_TAG#v}" # Strip 'v' prefix
7272
else

0 commit comments

Comments
 (0)