From 2a355c00c8f834b0048888cc1b5edbaed60b9648 Mon Sep 17 00:00:00 2001 From: Chris Titus Date: Thu, 29 Aug 2024 21:17:50 -0500 Subject: [PATCH] Update pre-release.yaml --- .github/workflows/pre-release.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/pre-release.yaml b/.github/workflows/pre-release.yaml index 40a3ecfa..d6ee1d4f 100644 --- a/.github/workflows/pre-release.yaml +++ b/.github/workflows/pre-release.yaml @@ -77,7 +77,13 @@ jobs: - name: Get latest release tag id: get_latest_release run: | + git fetch --tags --force $latestTag = git describe --tags --abbrev=0 + if ($LASTEXITCODE -ne 0) { + Write-Error "Failed to get latest tag. Error code: $LASTEXITCODE" + exit 1 + } + Write-Host "Latest tag: $latestTag" echo "LATEST_TAG=$latestTag" >> $env:GITHUB_ENV shell: pwsh