Getting the last tag from the current commit

This commit is contained in:
2025-01-22 21:16:36 +01:00
parent d1bf6bde59
commit b05e776dbf

View File

@@ -30,7 +30,7 @@ runs:
fi
- name: Get new version
run: |
last_version="$(git -c 'versionsort.suffix=-' ls-remote --tags -q --refs --sort '-v:refname' | head -n 1 | cut -d "/" -f3 || echo "")"
last_version="$(git describe --tags --abbrev=0 --match "v*" 2> /dev/null || echo "")"
if [[ -z "$last_version" ]]; then
last_version="v0.0.0"
fi