Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 44 additions & 43 deletions eng/pipelines/official.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,47 +121,48 @@ extends:
workloadDropNames: ${{ parameters.workloadDropNames }}
primaryVsInsertionBranches: ${{ parameters.primaryVsInsertionBranches }}
secondaryVsInsertionBranches: ${{ parameters.secondaryVsInsertionBranches }}
- stage: Publish
displayName: Publish
dependsOn: Build
jobs:
- deployment: PublishFeed
displayName: Publish to feed
environment: DotNet-SDK-Workloads
pool:
name: $(DncEngInternalBuildPool)
image: 1es-windows-2022
os: windows
templateContext:
type: releaseJob
isProduction: true
strategy:
runOnce:
deploy:
steps:
- task: 1ES.DownloadPipelineArtifact@1
displayName: 🟣 Download build artifacts
inputs:
artifactName: Artifacts
targetPath: $(Build.SourcesDirectory)/artifacts
# 1ES docs: https://eng.ms/docs/cloud-ai-platform/devdiv/one-engineering-system-1es/1es-docs/1es-pipeline-templates/features/outputs/nuget-packages
# DotNetCoreCLI@2 docs: https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/reference/dotnet-core-cli-v2
- ${{ if eq(parameters.publishToAzDO, true) }}:
- task: 1ES.PublishNuget@1
displayName: 🟣 Publish packages to AzDO
inputs:
useDotNetTask: true
packagesToPush: $(Build.SourcesDirectory)/artifacts/packages/**/*.nupkg
packageParentPath: $(Build.SourcesDirectory)/artifacts
publishVstsFeed: ${{ parameters.azDOPublishFeed }}
- ${{ if eq(parameters.publishToNuGet, true) }}:
- task: 1ES.PublishNuget@1
displayName: 🟣 Publish packages to NuGet.org
- ${{ if or(eq(parameters.publishToAzDO, true), eq(parameters.publishToNuGet, true)) }}:
- stage: Publish
displayName: Publish
dependsOn: Build
jobs:
- deployment: PublishFeed
displayName: Publish to feed
environment: DotNet-SDK-Workloads
pool:
name: $(DncEngInternalBuildPool)
image: 1es-windows-2022
os: windows
templateContext:
type: releaseJob
isProduction: true
strategy:
runOnce:
deploy:
steps:
- task: 1ES.DownloadPipelineArtifact@1
displayName: 🟣 Download build artifacts
inputs:
useDotNetTask: false
packagesToPush: $(Build.SourcesDirectory)/artifacts/packages/**/*.nupkg
packageParentPath: $(Build.SourcesDirectory)/artifacts
nuGetFeedType: external
publishVstsFeed: https://api.nuget.org/v3/index.json
# Service connection: https://dev.azure.com/dnceng/internal/_settings/adminservices?resourceId=479fdc43-a27d-4f5f-b2fc-5cf19dce159a
publishFeedCredentials: nuget.org (dotnetframework)
artifactName: Artifacts
targetPath: $(Build.SourcesDirectory)/artifacts
# 1ES docs: https://eng.ms/docs/cloud-ai-platform/devdiv/one-engineering-system-1es/1es-docs/1es-pipeline-templates/features/outputs/nuget-packages
# DotNetCoreCLI@2 docs: https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/reference/dotnet-core-cli-v2
- ${{ if eq(parameters.publishToAzDO, true) }}:
- task: 1ES.PublishNuget@1
displayName: 🟣 Publish packages to AzDO
inputs:
useDotNetTask: true
packagesToPush: $(Build.SourcesDirectory)/artifacts/packages/**/*.nupkg
packageParentPath: $(Build.SourcesDirectory)/artifacts
publishVstsFeed: ${{ parameters.azDOPublishFeed }}
- ${{ if eq(parameters.publishToNuGet, true) }}:
- task: 1ES.PublishNuget@1
displayName: 🟣 Publish packages to NuGet.org
inputs:
useDotNetTask: false
packagesToPush: $(Build.SourcesDirectory)/artifacts/packages/**/*.nupkg
packageParentPath: $(Build.SourcesDirectory)/artifacts
nuGetFeedType: external
publishVstsFeed: https://api.nuget.org/v3/index.json
# Service connection: https://dev.azure.com/dnceng/internal/_settings/adminservices?resourceId=479fdc43-a27d-4f5f-b2fc-5cf19dce159a
publishFeedCredentials: nuget.org (dotnetframework)