From 839e844e383d6f4cfdc99242ec83b10ccc4a9880 Mon Sep 17 00:00:00 2001 From: Seda Yildiz Date: Tue, 26 Sep 2023 14:46:11 +0100 Subject: [PATCH] Find the latest version tag from the latest release --- .github/actions/set-build-variables/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/set-build-variables/action.yml b/.github/actions/set-build-variables/action.yml index 929718e..721c6dd 100644 --- a/.github/actions/set-build-variables/action.yml +++ b/.github/actions/set-build-variables/action.yml @@ -13,7 +13,7 @@ runs: - id: get-last-tagged-version run: | ## get the last tagged version from the tag history of the current branch - if none is found default to version '0.0.0' - LAST_TAGGED_VERSION=`git tag --sort=-committerdate 'v*' --merged | head -n 1 | sed -Ee 's/v//g'` && [ -z $LAST_TAGGED_VERSION ] && LAST_TAGGED_VERSION=0.0.0 + LAST_TAGGED_VERSION=`curl -s https://api.github.com/repos/Aqovia/durable-functions-test/releases/latest | grep -o '"tag_name": "[^"]*' | cut -d'"' -f4 | sed -Ee 's/v//g'` && [ -z $LAST_TAGGED_VERSION ] && LAST_TAGGED_VERSION=0.0.0 echo "::set-output name=last-tagged-version::$LAST_TAGGED_VERSION" shell: bash - id: get-branch-name