Skip to content

Commit 9d9c6d5

Browse files
authored
Merge pull request #457 from dotnet/backport/pr-456-to-release/9.0.1xx
2 parents 19bb75b + a2afc6c commit 9d9c6d5

File tree

1 file changed

+44
-43
lines changed

1 file changed

+44
-43
lines changed

eng/pipelines/official.yml

Lines changed: 44 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -118,47 +118,48 @@ extends:
118118
workloadDropNames: ${{ parameters.workloadDropNames }}
119119
primaryVsInsertionBranches: ${{ parameters.primaryVsInsertionBranches }}
120120
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
157142
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

Comments
 (0)