diff --git a/tools/travis.ps1 b/tools/travis.ps1 index b60733610f2..58a8aad1ef3 100644 --- a/tools/travis.ps1 +++ b/tools/travis.ps1 @@ -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