Add release tag if the environment variable is set

This commit is contained in:
Aditya Patwardhan
2024-05-16 10:58:34 -07:00
parent da1ca4a726
commit 31021f3dbf
3 changed files with 24 additions and 3 deletions
+8 -1
View File
@@ -77,7 +77,14 @@ jobs:
Start-PSBootstrap
$null = New-Item -ItemType Directory -Path $buildWithSymbolsPath -Force -Verbose
Start-PSBuild -Runtime $runtime -Configuration Release -Output $buildWithSymbolsPath @params -Clean -PSModuleRestore
$ReleaseTagParam = @{}
if ($env:RELEASETAGVAR) {
$ReleaseTagParam['ReleaseTag'] = $env:RELEASETAGVAR
}
Start-PSBuild -Runtime $runtime -Configuration Release -Output $buildWithSymbolsPath @params -Clean -PSModuleRestore @ReleaseTagParam
$outputPath = Join-Path '$(ob_outputDirectory)' 'psoptions'
$null = New-Item -ItemType Directory -Path $outputPath -Force
+8 -1
View File
@@ -56,7 +56,14 @@ jobs:
# macos-10.15 does not allow creating a folder under root. Hence, moving the folder.
Import-Module ./build.psm1 -Force
Start-PSBuild -Runtime 'osx-${{ parameters.buildArchitecture }}' -Configuration Release -PSModuleRestore -Clean -Output $(OB_OUTPUTDIRECTORY)
$ReleaseTagParam = @{}
if ($env:RELEASETAGVAR) {
$ReleaseTagParam['ReleaseTag'] = $env:RELEASETAGVAR
}
Start-PSBuild -Runtime 'osx-${{ parameters.buildArchitecture }}' -Configuration Release -PSModuleRestore -Clean -Output $(OB_OUTPUTDIRECTORY) @ReleaseTagParam
$artifactName = "macosBinResults-${{ parameters.buildArchitecture }}"
$psOptPath = "$(OB_OUTPUTDIRECTORY)/psoptions.json"
@@ -87,7 +87,14 @@ jobs:
Start-PSBootstrap -Package
$null = New-Item -ItemType Directory -Path $buildWithSymbolsPath -Force -Verbose
Start-PSBuild -Runtime $runtime -Configuration Release -Output $buildWithSymbolsPath -Clean -PSModuleRestore @params
$ReleaseTagParam = @{}
if ($env:RELEASETAGVAR) {
$ReleaseTagParam['ReleaseTag'] = $env:RELEASETAGVAR
}
Start-PSBuild -Runtime $runtime -Configuration Release -Output $buildWithSymbolsPath -Clean -PSModuleRestore @params @ReleaseTagParam
$refFolderPath = Join-Path $buildWithSymbolsPath 'ref'
Write-Verbose -Verbose "refFolderPath: $refFolderPath"