@@ -12,15 +12,16 @@ pool:
1212
1313variables :
1414 Configuration : Release
15+ buildNumber : $[ counter('build', 400) ] # Start higher than our AppVeyor versions. Every build (pr or branch) will increment.
1516
1617steps :
1718- pwsh : ./build.ps1 -NoBuild -Bootstrap
1819 displayName : ' Running ./build.ps1 -NoBuild -Bootstrap'
1920
2021- pwsh : |
2122 $ErrorActionPreference = "Stop"
22- ./build.ps1 -Clean -Configuration Release
23- displayName : ' ./build.ps1 -Clean -Configuration Release '
23+ ./build.ps1 -Clean -Configuration Release -BuildNumber "$(buildNumber)"
24+ displayName : ' Build worker code '
2425
2526- pwsh : ./build.ps1 -NoBuild -Test
2627 displayName : ' Running UnitTest'
@@ -47,4 +48,22 @@ steps:
4748 PathtoPublish : ' $(Build.ArtifactStagingDirectory)'
4849 ArtifactName : ' drop'
4950 publishLocation : ' Container'
50- displayName : ' Publishing build and test result artifacts'
51+ displayName : ' Publishing build and test result artifacts'
52+
53+ - pwsh : |
54+ $sourcePath = (ls package/**/*/Microsoft.Azure.Functions.PowerShellWorker*.nupkg).FullName
55+ if (-not (test-path $sourcePath))
56+ {
57+ throw 'Unable to find Microsoft.Azure.Functions.PowerShellWorker*.nupkg at ./package'
58+ }
59+ Copy-Item -Path $sourcePath -Destination $(Build.ArtifactStagingDirectory) -ErrorAction Stop -Verbose -Force
60+ displayName : ' Copy package to ArtifactStagingDirectory'
61+
62+ - task : NuGetCommand@2
63+ condition : and(ne(variables['Build.Reason'], 'PullRequest'), in(variables['Build.SourceBranchName'], 'v3.x/ps7', 'v3.x/ps6', 'v2.x'))
64+ inputs :
65+ command : ' push'
66+ packagesToPush : ' $(Build.ArtifactStagingDirectory)/**/*.nupkg;!$(Build.ArtifactStagingDirectory)/**/*.symbols.nupkg'
67+ nuGetFeedType : ' internal'
68+ publishVstsFeed : ' e6a70c92-4128-439f-8012-382fe78d6396/c0493cce-bc63-4e11-9fc9-e7c45291f151'
69+ allowPackageConflicts : true
0 commit comments