From cb031e275edc38ceb29dd139c2d21a48d4fa88ea Mon Sep 17 00:00:00 2001 From: Michael Ro Date: Thu, 28 Mar 2024 11:20:24 -0700 Subject: [PATCH] chore(release): Add step to fetch from remote (#1589) Reverts #1588 --- .github/workflows/release-windows-installer.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/workflows/release-windows-installer.yml b/.github/workflows/release-windows-installer.yml index 36c6273ba..8cc6649ef 100644 --- a/.github/workflows/release-windows-installer.yml +++ b/.github/workflows/release-windows-installer.yml @@ -22,6 +22,20 @@ jobs: with: fetch-depth: 0 + - name: Output latest tag + id: latest-tag + run: | + $tag = git describe --tags $(git rev-list --tags --max-count=1) + + Write-Host "Latest tag - before: $tag" + + git fetch origin + git fetch --tags + + $latestTag = git describe --tags $(git rev-list --tags --max-count=1) + + Write-Host "Latest tag - after: $latestTag" + - name: Add msbuild to PATH uses: microsoft/setup-msbuild@v1.3 @@ -34,6 +48,7 @@ jobs: - name: Compile installer run: | $LATEST_VERSION = git describe --tags $(git rev-list --tags --max-count=1) | ForEach-Object { $_ -replace 'v', '' } + Write-Host "(Compile installer) Latest version $LATEST_VERSION" msbuild .\build\package\msi\NewRelicCLIInstaller.sln -p:Version=$LATEST_VERSION - name: Create PFX certificate