Publish global tool package for stable releases (#15961)

This commit is contained in:
Dongbo Wang 2021-08-20 11:23:30 -07:00 committed by GitHub
parent 40928f7a97
commit e70ad6ce25
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -29,8 +29,11 @@ steps:
$releaseVersion = Get-Content "$ENV:PIPELINE_WORKSPACE/releasePipeline/metadata/release.json" | ConvertFrom-Json | Select-Object -ExpandProperty 'ReleaseVersion'
$globalToolPath = "$ENV:PIPELINE_WORKSPACE/releasePipeline/finalResults/PowerShell.$releaseVersion.nupkg"
### -WhatIf to make sure we do not release global tool. Remove -WhatIf when the PowerShell name reservation is done.
Copy-Item $globalToolPath -Destination "$(Pipeline.Workspace)/release" -WhatIf
if ($releaseVersion -notlike '*-*') {
# Copy the global tool package for stable releases
Copy-Item $globalToolPath -Destination "$(Pipeline.Workspace)/release"
}
Get-ChildItem "$(Pipeline.Workspace)/release" -recurse
displayName: Download and capture nupkgs