@@ -5,13 +5,15 @@ name: $(BuildDefinitionName)_$(SourceBranchName)_$(Date:yyyyMMdd)$(Rev:.r)
55trigger :
66  branches :
77    include :
8-     - master 
9-     - vnext 
8+     - main 
9+     - dev 
10+     - support/v1 
1011pr :
1112  branches :
1213    include :
13-     - master 
14-     - vnext 
14+     - main 
15+     - dev 
16+     - support/v1 
1517variables :
1618  buildPlatform : ' Any CPU' 
1719  buildConfiguration : ' Release' 
@@ -206,10 +208,17 @@ extends:
206208            content : ' *.nupkg' 
207209
208210    - stage : deploy 
209-       condition : and(contains(variables['build.sourceBranch'], 'refs/heads/master' ), succeeded()) 
211+       condition : and(or( contains(variables['build.sourceBranch'], 'refs/heads/main'),contains(variables['build.sourceBranch'], 'refs/heads/support/v1') ), succeeded()) 
210212      dependsOn : build 
211213      jobs :
212214      - deployment : deploy_hidi 
215+         templateContext :
216+           type : releaseJob 
217+           isProduction : true 
218+           inputs :
219+           - input : pipelineArtifact 
220+             artifactName : Nugets 
221+             targetPath : ' $(Pipeline.Workspace)' 
213222        dependsOn : [] 
214223        environment : nuget-org 
215224        strategy :
@@ -218,11 +227,6 @@ extends:
218227              pool :
219228                vmImage : ubuntu-latest 
220229              steps :
221-               - task : DownloadPipelineArtifact@2 
222-                 displayName : Download nupkg from artifacts 
223-                 inputs :
224-                   artifact : Nugets 
225-                   source : current 
226230              - task : DownloadPipelineArtifact@2 
227231                displayName : Download hidi executable from artifacts 
228232                inputs :
@@ -264,6 +268,13 @@ extends:
264268                    ]'  
265269
266270      - deployment : deploy_lib 
271+         templateContext :
272+           type : releaseJob 
273+           isProduction : true 
274+           inputs :
275+           - input : pipelineArtifact 
276+             artifactName : Nugets 
277+             targetPath : ' $(Pipeline.Workspace)' 
267278        dependsOn : [] 
268279        environment : nuget-org 
269280        strategy :
@@ -272,11 +283,6 @@ extends:
272283              pool :
273284                vmImage : ubuntu-latest 
274285              steps :
275-               - task : DownloadPipelineArtifact@2 
276-                 displayName : Download nupkg from artifacts 
277-                 inputs :
278-                   artifact : Nugets 
279-                   source : current 
280286              - powershell : | 
281287                  $fileNames = "$(Pipeline.Workspace)/Nugets/Microsoft.OpenApi.Hidi.*.nupkg", "$(Pipeline.Workspace)/Nugets/Microsoft.OpenApi.Readers.*.nupkg", "$(Pipeline.Workspace)/Nugets/Microsoft.OpenApi.Workbench.*.nupkg" 
282288                  foreach($fileName in $fileNames) { 
@@ -294,6 +300,13 @@ extends:
294300                  publishFeedCredentials : ' OpenAPI Nuget Connection' 
295301
296302      - deployment : deploy_readers 
303+         templateContext :
304+           type : releaseJob 
305+           isProduction : true 
306+           inputs :
307+           - input : pipelineArtifact 
308+             artifactName : Nugets 
309+             targetPath : ' $(Pipeline.Workspace)' 
297310        dependsOn : deploy_lib 
298311        environment : nuget-org 
299312        strategy :
@@ -302,11 +315,6 @@ extends:
302315              pool :
303316                vmImage : ubuntu-latest 
304317              steps :
305-               - task : DownloadPipelineArtifact@2 
306-                 displayName : Download nupkg from artifacts 
307-                 inputs :
308-                   artifact : Nugets 
309-                   source : current 
310318              - task : 1ES.PublishNuget@1 
311319                displayName : ' NuGet push' 
312320                inputs :
0 commit comments