Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .vsts-ci/templates/windows-packaging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@ jobs:
- pwsh: |
Import-Module .\tools\ci.psm1
New-CodeCoverageAndTestPackage
Invoke-CIFinish -NuGetKey $(NUGET_KEY)
Invoke-CIFinish
displayName: Build and Test Package
26 changes: 1 addition & 25 deletions tools/ci.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -437,13 +437,9 @@ function Get-ReleaseTag
# Implements CI 'on_finish' step
function Invoke-CIFinish
{
param(
[string] $NuGetKey
)

if($PSEdition -eq 'Core' -and ($IsLinux -or $IsMacOS))
{
return New-LinuxPackage -NugetKey $NugetKey
return New-LinuxPackage
}

try {
Expand Down Expand Up @@ -537,12 +533,6 @@ function Invoke-CIFinish
$pushedAllArtifacts = $false
Write-Warning "Artifact $_ does not exist."
}

if($NuGetKey -and $env:NUGET_URL -and [system.io.path]::GetExtension($_) -ieq '.nupkg')
{
Write-Log "pushing $_ to $env:NUGET_URL"
Start-NativeExecution -sb {dotnet nuget push $_ --api-key $NuGetKey --source "$env:NUGET_URL/api/v2/package"} -IgnoreExitcode
}
}
if(!$pushedAllArtifacts)
{
Expand Down Expand Up @@ -692,10 +682,6 @@ function Invoke-LinuxTestsCore

function New-LinuxPackage
{
param(
[string]
$NugetKey
)

$isFullBuild = Test-DailyBuild
$releaseTag = Get-ReleaseTag
Expand All @@ -716,16 +702,6 @@ function New-LinuxPackage
Write-Error -Message "Package NOT found: $package"
}

# 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($isFullBuild -and $NugetKey -and $env:NUGET_URL -and [system.io.path]::GetExtension($package) -ieq '.nupkg')
{
Write-Log "pushing $package to $env:NUGET_URL"
Start-NativeExecution -sb {dotnet nuget push $package --api-key $NugetKey --source "$env:NUGET_URL/api/v2/package"} -IgnoreExitcode
}

if($isFullBuild)
{
if ($package -isnot [System.IO.FileInfo])
Expand Down