| jobs: |
| - job: Publish_Nuget |
| displayName: Publish Nuget packages |
| condition: and(succeeded(), eq(variables['DoNuget'], 'true')) |
| |
| pool: |
| vmName: win2016-vs2017 |
| |
| workspace: |
| clean: all |
| |
| steps: |
| - checkout: none |
| |
| - task: DownloadBuildArtifacts@0 |
| displayName: 'Download artifact: nuget' |
| condition: and(succeeded(), not(variables['BuildToPublish'])) |
| inputs: |
| artifactName: nuget |
| downloadPath: $(Build.BinariesDirectory) |
| |
| - task: DownloadBuildArtifacts@0 |
| displayName: 'Download artifact: nuget' |
| condition: and(succeeded(), variables['BuildToPublish']) |
| inputs: |
| artifactName: nuget |
| downloadPath: $(Build.BinariesDirectory) |
| buildType: specific |
| project: cpython |
| pipeline: Windows-Release |
| buildVersionToDownload: specific |
| buildId: $(BuildToPublish) |
| |
| - powershell: 'gci pythonarm*.nupkg | %{ Write-Host "Not publishing: $($_.Name)"; gi $_ } | del' |
| displayName: 'Prevent publishing ARM/ARM64 packages' |
| workingDirectory: '$(Build.BinariesDirectory)\nuget' |
| condition: and(succeeded(), not(variables['PublishArmPackages'])) |
| |
| - task: NuGetCommand@2 |
| displayName: Push packages |
| condition: and(succeeded(), eq(variables['SigningCertificate'], variables['__RealSigningCertificate'])) |
| inputs: |
| command: push |
| packagesToPush: '$(Build.BinariesDirectory)\nuget\*.nupkg' |
| nuGetFeedType: external |
| publishFeedCredentials: 'Python on Nuget' |