mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
Only push to NuGet for Full Build (cron) (#4517)
This commit is contained in:
+5
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user