Deploy to NuGet on successful build on master

This commit is contained in:
Frederik Carlier
2020-09-17 14:22:14 +02:00
parent 4c6baa1c5a
commit 248d1b7bea

View File

@@ -222,4 +222,28 @@ stages:
set -e
chmod +x ./test-tarball
./test-tarball
displayName: Execute program
displayName: Execute program
- job: publish_nuget
pool:
vmImage: 'VS2017-Win2016'
dependsOn:
- test_macos
- molecule
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
steps:
- task: DownloadBuildArtifacts@0
inputs:
artifactName: 'nuget'
displayName: 'Download NuGet artifacts'
- task: NuGetToolInstaller@0
displayName: Install NuGet
- task: NuGetCommand@2
inputs:
command: push
packagesToPush: '$(System.ArtifactsDirectory)/nuget/*.nupkg'
publishFeedCredentials: 'NuGet'
nuGetFeedType: external