From a34b9ab978f83eb64b6eef7f3eef9f8487dcacc0 Mon Sep 17 00:00:00 2001 From: Safeer Jiwan Date: Thu, 3 Oct 2024 11:43:54 -0700 Subject: [PATCH] retrieve latest tagged release --- .github/workflows/ci.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ea6afa839e..20f4255731 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -367,10 +367,19 @@ jobs: if: github.event_name != 'pull_request' || github.event.action == 'enqueued' || contains( github.event.pull_request.labels.*.name, 'run-all') runs-on: ubuntu-latest steps: + - name: Checkout the repository with full history + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Get latest release tag + run: | + latest_release=$(git tag --sort=-v:refname | grep -v v1 | head -n 1) + echo "Latest release: $latest_release" + echo "LATEST_RELEASE=$latest_release" >> "$GITHUB_OUTPUT" - name: Checkout previous code uses: actions/checkout@v4 with: - ref: 'refs/tags/previous-release' + ref: ${{ env.LATEST_RELEASE }} - name: Init Hermit uses: cashapp/activate-hermit@v1 with: