From f680a28882fe2fb09926be006dd6fce84b7e7f70 Mon Sep 17 00:00:00 2001 From: "Jeff Parker, PE" Date: Wed, 3 Apr 2024 11:18:57 -0500 Subject: [PATCH] fix GITHUB_REF_TYPE=tag for publish --- Build.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Build.ps1 b/Build.ps1 index 1d8fd63..9428942 100644 --- a/Build.ps1 +++ b/Build.ps1 @@ -65,7 +65,7 @@ foreach ($test in Get-ChildItem test/*.Tests) { Pop-Location if ($env:NUGET_API_KEY ` - -and (("tag" -eq $env:GITHUB_REF_NAME -and $NULL -ne $prefix) ` + -and (($env:GITHUB_REF_TYPE -eq "tag" -and $NULL -ne $prefix) ` -or ($NULL -ne $suffix -and ($env:CI_TARGET_BRANCH -eq "dev" -or $env:CI_TARGET_BRANCH -eq "master")))) { # GitHub Actions will only supply this to branch builds and not PRs. We publish # builds from any branch this action targets (i.e. master and dev). @@ -81,6 +81,6 @@ if ($env:NUGET_API_KEY ` if ($null -eq $env:NUGET_API_KEY) { Write-Output "build: Skipping Nuget publish, API key null" } else { - Write-Output "build: Skipping Nuget publish reftype: $env:GITHUB_REF_TYPE" + Write-Output "build: Skipping Nuget publish reftype: $env:GITHUB_REF_TYPE, branch: $env:CI_TARGET_BRANCH" } } \ No newline at end of file