Skip to content

Commit 698b50d

Browse files
authored
Added test for a release build in GH Actions (#147)
1 parent 6dfe605 commit 698b50d

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

buildutils.ps1

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -361,8 +361,14 @@ function Initialize-BuildEnvironment
361361
$global:IsReleaseBuild = [System.Convert]::ToBoolean($env:IsReleaseBuild)
362362
if(!$global:IsReleaseBuild -and $global:IsAutomatedBuild -and !$global:IsPullRequestBuild)
363363
{
364-
# TODO: Determine how to detect release tag builds with GITHUB ACTIONS
365-
$global:IsReleaseBuild = $env:APPVEYOR_REPO_TAG
364+
if($env:APPVEYOR)
365+
{
366+
$global:IsReleaseBuild = $env:APPVEYOR_REPO_TAG
367+
}
368+
else
369+
{
370+
$global:IsReleaseBuild = $env:GITHUB_REF -like 'refs/tags/*'
371+
}
366372
}
367373

368374
# set/reset environment vars for non-script tools (i.e. msbuild.exe)

0 commit comments

Comments
 (0)