Skip to content

Commit 88dfac1

Browse files
author
Evilazaro Alves
committed
get latest tag
1 parent b19b1c9 commit 88dfac1

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

.github/actions/ci/generate-release/action.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,11 @@ runs:
6363
run: |
6464
# Fetch all tags
6565
git fetch --tags --force
66-
tag=$(git describe --tags --abbrev=0 2>/dev/null || echo "v0.0.0")
66+
# Get the latest tag matching v<major>.<minor>.<patch>
67+
tag=$(git tag --list 'v[0-9]*.[0-9]*.[0-9]*' | sort -V | tail -n 1)
68+
if [ -z "$tag" ]; then
69+
tag="v0.0.0"
70+
fi
6771
echo "tag=$tag" >> $GITHUB_OUTPUT
6872
echo "✅ Latest tag: $tag"
6973

0 commit comments

Comments
 (0)