From 9fbda3465cebaf51ae0485d6a67563264f8d7f61 Mon Sep 17 00:00:00 2001 From: Debdut Chakraborty Date: Thu, 1 Sep 2022 09:48:57 +0530 Subject: [PATCH 1/2] chore: use tags; fix regex --- .github/workflows/build_and_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index 50138d215a3c..a90e022bf183 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -43,7 +43,7 @@ jobs: run: | LATEST_RELEASE="$( git -c 'versionsort.suffix=-' ls-remote -t --exit-code --refs --sort=-v:refname "https://github.com/$GITHUB_REPOSITORY" '*' | - sed -En '1!q;s/^[[:xdigit:]]+[[:space:]]+refs\/tags\/(.+)/\1/gp' + awk -F/ '$NF !~ /rc/ { print $NF; exit }' )" echo "LATEST_RELEASE: ${LATEST_RELEASE}" echo "::set-output name=latest-release::${LATEST_RELEASE}" From f5e80ab529798d4ba851f3a8b8560941cac59407 Mon Sep 17 00:00:00 2001 From: Debdut Chakraborty Date: Thu, 1 Sep 2022 17:55:58 +0530 Subject: [PATCH 2/2] check for beta tags too --- .github/workflows/build_and_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index a90e022bf183..d434f09433f1 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -43,7 +43,7 @@ jobs: run: | LATEST_RELEASE="$( git -c 'versionsort.suffix=-' ls-remote -t --exit-code --refs --sort=-v:refname "https://github.com/$GITHUB_REPOSITORY" '*' | - awk -F/ '$NF !~ /rc/ { print $NF; exit }' + awk -F/ '$NF !~ /rc|beta/ { print $NF; exit }' )" echo "LATEST_RELEASE: ${LATEST_RELEASE}" echo "::set-output name=latest-release::${LATEST_RELEASE}"