From 33c0158ff9ca711921a2d882b237536078398f52 Mon Sep 17 00:00:00 2001 From: Christopher Jolly Date: Thu, 7 Dec 2023 21:39:36 +0800 Subject: [PATCH] Update push.yml (#186) Use a better way to get the tag to see if it should be an official build --- .github/workflows/push.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 5445517..66d6f0f 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -351,7 +351,8 @@ jobs: - name: NuGet Pack shell: pwsh run: | - $officialBuild = '${{ github.ref }}' -match '(?<=^refs/tags/v)\d+\.\d+\.\d+.*$' + $tagName = git tag --points-at HEAD + $officialBuild = $tagName -match '(?<=^v)\d+\.\d+\.\d+.*$' $officialVersion = $Matches.0 $wipBuild = '${{ github.ref }}' -match '^refs/heads/.*-wip$' $ciBuildOnly = $wipBuild -or ('${{ github.ref }}' -match '^refs/heads/(?:master|.*-servicing)$')