From b05e776dbf11a218d7e11b0091b7bdffbefa6fe8 Mon Sep 17 00:00:00 2001 From: Skydust Date: Wed, 22 Jan 2025 21:16:36 +0100 Subject: [PATCH] Getting the last tag from the current commit --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 9df1880..816c5ae 100644 --- a/action.yml +++ b/action.yml @@ -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