From 933ce92ee5cc6ed956e48c74381939898cbeeedc Mon Sep 17 00:00:00 2001 From: Skydust Date: Wed, 25 Dec 2024 19:12:23 +0100 Subject: [PATCH] Added a better way to get the last tag --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index e6bf532..fdbdeaf 100644 --- a/action.yml +++ b/action.yml @@ -13,7 +13,7 @@ runs: else log_info "This is a branch push: $(yellow)${GITHUB_REF##refs/heads/}" - last_version="$(git describe --tags --match "v*" --abbrev=0 || echo "")" + last_version="$(git -c 'versionsort.suffix=-' ls-remote --tags -q --refs --sort '-v:refname' | head -n 1 | cut -d "/" -f3)" if [[ -z "$last_version" ]]; then last_version="v0.0.0" fi