From b6b2da5eb761ac5894cc7a2ee67f422312b63cfc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Orhun=20Parmaks=C4=B1z?= Date: Sat, 19 Aug 2023 15:14:17 +0200 Subject: [PATCH] fix(release): fix the last tag retrieval for alpha releases (#416) --- .github/workflows/cd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 72209fc7..dcfa1a13 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -30,7 +30,7 @@ jobs: - name: Calculate the next release run: | suffix="alpha" - last_tag="$(git describe --abbrev=0 --tags `git rev-list --tags --max-count=1`)" + last_tag="$(git tag --sort=committerdate | tail -1)" if [[ "${last_tag}" = *"-${suffix}"* ]]; then # increment the alpha version # e.g. v0.22.1-alpha.12 -> v0.22.1-alpha.13