Getting the last tag from the current commit
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user