mirror of
https://github.com/PowerShell/PowerShell.git
synced 2024-11-24 02:04:07 +08:00
Only push to NuGet for Full Build (cron) (#4517)
This commit is contained in:
parent
0bfee35525
commit
b3ebdafccd
@ -183,7 +183,11 @@ else
|
||||
$packages += Start-PSPackage @packageParams -Type AppImage
|
||||
foreach($package in $packages)
|
||||
{
|
||||
if($env:NUGET_KEY -and $env:NUGET_URL -and [system.io.path]::GetExtension($package) -ieq '.nupkg')
|
||||
# Publish the packages to the nuget feed if:
|
||||
# 1 - It's a Daily build (already checked, for not a PR)
|
||||
# 2 - We have the info to publish (NUGET_KEY and NUGET_URL)
|
||||
# 3 - it's a nupkg file
|
||||
if($isDailyBuild -and $env:NUGET_KEY -and $env:NUGET_URL -and [system.io.path]::GetExtension($package) -ieq '.nupkg')
|
||||
{
|
||||
log "pushing $package to $env:NUGET_URL"
|
||||
Start-NativeExecution -sb {dotnet nuget push $package --api-key $env:NUGET_KEY --source "$env:NUGET_URL/api/v2/package"} -IgnoreExitcode
|
||||
|
Loading…
Reference in New Issue
Block a user