From 6e357b6b0d4f2c74e785447379d79afd899a0b03 Mon Sep 17 00:00:00 2001 From: Emanuel Fernandez Dell'Oca Date: Fri, 24 Jun 2022 17:48:08 -0400 Subject: [PATCH] [ci] Enable pushing NuGet package to xamarin-impl feed --- build/stages/package.yml | 54 +++++++++++++++++++--------------------- 1 file changed, 25 insertions(+), 29 deletions(-) diff --git a/build/stages/package.yml b/build/stages/package.yml index b7b96ab..12df3f9 100644 --- a/build/stages/package.yml +++ b/build/stages/package.yml @@ -30,35 +30,31 @@ stages: GitHub.FileStatuses: true GitHub.ArtifactsTraversal: 'TopLevel' - # TODO: - # Job disabled until we implement pushing to xamarin-impl as a testing feed. - # Right now the packages will only be pushed to nuget.org through the System.Net.Mqtt release pipeline - # - job: Push - # displayName: 'Pack & Push' - # condition: and(succeeded(), eq(variables['Build.SourceBranch'], variables['MainBranch'])) - # timeoutInMinutes: 10 - # pool: - # name: $(WindowsPoolName) - # steps: - # - checkout: self + - job: Push + condition: and(succeeded(), eq(variables['Build.SourceBranch'], variables['MainBranch'])) + timeoutInMinutes: 10 + pool: + name: $(WindowsPoolName) + steps: + - checkout: self - # - task: DownloadBuildArtifacts@0 - # displayName: 'Download Packages' - # inputs: - # artifactName: packages - # downloadPath: '$(Build.ArtifactStagingDirectory)' + - task: DownloadBuildArtifacts@0 + displayName: 'Download Packages' + inputs: + artifactName: packages + downloadPath: '$(Build.ArtifactStagingDirectory)' - # - task: NuGetCommand@2 - # displayName: 'NuGet Update' - # inputs: - # command: custom - # arguments: 'update -self' + - task: NuGetCommand@2 + displayName: 'NuGet Update' + inputs: + command: custom + arguments: 'update -self' - # - task: NuGetCommand@2 - # displayName: 'Push Packages' - # continueOnError: true - # inputs: - # command: push - # packagesToPush: '$(Build.ArtifactStagingDirectory)/packages/*.nupkg' - # nuGetFeedType: external - # publishFeedCredentials: '$(PackagesFeedCredentials)' + - task: NuGetCommand@2 + displayName: 'Push Packages' + continueOnError: true + inputs: + command: push + packagesToPush: '$(Build.ArtifactStagingDirectory)/packages/*.nupkg' + nuGetFeedType: external + publishFeedCredentials: 'xamarin-impl public feed'