@@ -118,47 +118,48 @@ extends:
118
118
workloadDropNames : ${{ parameters.workloadDropNames }}
119
119
primaryVsInsertionBranches : ${{ parameters.primaryVsInsertionBranches }}
120
120
secondaryVsInsertionBranches : ${{ parameters.secondaryVsInsertionBranches }}
121
- - stage : Publish
122
- displayName : Publish
123
- dependsOn : Build
124
- jobs :
125
- - deployment : PublishFeed
126
- displayName : Publish to feed
127
- environment : DotNet-SDK-Workloads
128
- pool :
129
- name : $(DncEngInternalBuildPool)
130
- image : 1es-windows-2022
131
- os : windows
132
- templateContext :
133
- type : releaseJob
134
- isProduction : true
135
- strategy :
136
- runOnce :
137
- deploy :
138
- steps :
139
- - task : 1ES.DownloadPipelineArtifact@1
140
- displayName : 🟣 Download build artifacts
141
- inputs :
142
- artifactName : Artifacts
143
- targetPath : $(Build.SourcesDirectory)/artifacts
144
- # 1ES docs: https://eng.ms/docs/cloud-ai-platform/devdiv/one-engineering-system-1es/1es-docs/1es-pipeline-templates/features/outputs/nuget-packages
145
- # DotNetCoreCLI@2 docs: https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/reference/dotnet-core-cli-v2
146
- - ${{ if eq(parameters.publishToAzDO, true) }} :
147
- - task : 1ES.PublishNuget@1
148
- displayName : 🟣 Publish packages to AzDO
149
- inputs :
150
- useDotNetTask : true
151
- packagesToPush : $(Build.SourcesDirectory)/artifacts/packages/**/*.nupkg
152
- packageParentPath : $(Build.SourcesDirectory)/artifacts
153
- publishVstsFeed : ${{ parameters.azDOPublishFeed }}
154
- - ${{ if eq(parameters.publishToNuGet, true) }} :
155
- - task : 1ES.PublishNuget@1
156
- displayName : 🟣 Publish packages to NuGet.org
121
+ - ${{ if or(eq(parameters.publishToAzDO, true), eq(parameters.publishToNuGet, true)) }} :
122
+ - stage : Publish
123
+ displayName : Publish
124
+ dependsOn : Build
125
+ jobs :
126
+ - deployment : PublishFeed
127
+ displayName : Publish to feed
128
+ environment : DotNet-SDK-Workloads
129
+ pool :
130
+ name : $(DncEngInternalBuildPool)
131
+ image : 1es-windows-2022
132
+ os : windows
133
+ templateContext :
134
+ type : releaseJob
135
+ isProduction : true
136
+ strategy :
137
+ runOnce :
138
+ deploy :
139
+ steps :
140
+ - task : 1ES.DownloadPipelineArtifact@1
141
+ displayName : 🟣 Download build artifacts
157
142
inputs :
158
- useDotNetTask : false
159
- packagesToPush : $(Build.SourcesDirectory)/artifacts/packages/**/*.nupkg
160
- packageParentPath : $(Build.SourcesDirectory)/artifacts
161
- nuGetFeedType : external
162
- publishVstsFeed : https://api.nuget.org/v3/index.json
163
- # Service connection: https://dev.azure.com/dnceng/internal/_settings/adminservices?resourceId=479fdc43-a27d-4f5f-b2fc-5cf19dce159a
164
- publishFeedCredentials : nuget.org (dotnetframework)
143
+ artifactName : Artifacts
144
+ targetPath : $(Build.SourcesDirectory)/artifacts
145
+ # 1ES docs: https://eng.ms/docs/cloud-ai-platform/devdiv/one-engineering-system-1es/1es-docs/1es-pipeline-templates/features/outputs/nuget-packages
146
+ # DotNetCoreCLI@2 docs: https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/reference/dotnet-core-cli-v2
147
+ - ${{ if eq(parameters.publishToAzDO, true) }} :
148
+ - task : 1ES.PublishNuget@1
149
+ displayName : 🟣 Publish packages to AzDO
150
+ inputs :
151
+ useDotNetTask : true
152
+ packagesToPush : $(Build.SourcesDirectory)/artifacts/packages/**/*.nupkg
153
+ packageParentPath : $(Build.SourcesDirectory)/artifacts
154
+ publishVstsFeed : ${{ parameters.azDOPublishFeed }}
155
+ - ${{ if eq(parameters.publishToNuGet, true) }} :
156
+ - task : 1ES.PublishNuget@1
157
+ displayName : 🟣 Publish packages to NuGet.org
158
+ inputs :
159
+ useDotNetTask : false
160
+ packagesToPush : $(Build.SourcesDirectory)/artifacts/packages/**/*.nupkg
161
+ packageParentPath : $(Build.SourcesDirectory)/artifacts
162
+ nuGetFeedType : external
163
+ publishVstsFeed : https://api.nuget.org/v3/index.json
164
+ # Service connection: https://dev.azure.com/dnceng/internal/_settings/adminservices?resourceId=479fdc43-a27d-4f5f-b2fc-5cf19dce159a
165
+ publishFeedCredentials : nuget.org (dotnetframework)
0 commit comments