Skip to content

Commit 10a7d07

Browse files
committed
[CI] Add Publish Stage
1 parent ba78625 commit 10a7d07

File tree

3 files changed

+44
-12
lines changed

3 files changed

+44
-12
lines changed

Diff for: eng/pipelines/official.yml

+22
Original file line numberDiff line numberDiff line change
@@ -116,3 +116,25 @@ extends:
116116
workloadDropNames: ${{ parameters.workloadDropNames }}
117117
primaryVsInsertionBranches: ${{ parameters.primaryVsInsertionBranches }}
118118
secondaryVsInsertionBranches: ${{ parameters.secondaryVsInsertionBranches }}
119+
- stage: Publish
120+
displayName: Publish
121+
dependsOn: Build
122+
condition: succeeded()
123+
jobs:
124+
- deployment: Publish
125+
environment: 'DotNet-SDK-Workloads'
126+
pool:
127+
name: $(DncEngInternalBuildPool)
128+
image: 1es-windows-2022
129+
os: windows
130+
templateContext:
131+
type: releaseJob
132+
isProduction: true
133+
strategy:
134+
runOnce:
135+
deploy:
136+
steps:
137+
- template: /eng/pipelines/templates/steps/workload-publish.yml@self
138+
parameters:
139+
publishToFeed: ${{ parameters.publishToFeed }}
140+
feedForPublishing: ${{ parameters.feedForPublishing }}

Diff for: eng/pipelines/templates/jobs/workload-build.yml

-12
Original file line numberDiff line numberDiff line change
@@ -62,18 +62,6 @@ jobs:
6262
/p:StabilizePackageVersion=${{ parameters.stabilizePackageVersion }}
6363
displayName: 🟣 Build solution
6464
65-
- ${{ if eq(parameters.publishToFeed, true) }}:
66-
- task: 1ES.PublishNuget@1
67-
displayName: 🟣 Publish NuGet package
68-
inputs:
69-
useDotNetTask: true
70-
packagesToPush: $(Build.SourcesDirectory)/artifacts/packages/**/*.nupkg
71-
packageParentPath: $(Build.SourcesDirectory)/artifacts/packages
72-
publishVstsFeed: ${{ parameters.feedForPublishing }}
73-
nuGetFeedType: internal
74-
allowPackageConflicts: false
75-
publishPackageMetadata: true
76-
7765
- ${{ if eq(parameters.createVSInsertion, true) }}:
7866
# The variables comprised of workloadShortName and workloadType are set during create-workload-drops.ps1 in Microsoft.NET.Workloads.Vsman.csproj.
7967
- ${{ each workloadShortName in parameters.workloadDropNames }}:

Diff for: eng/pipelines/templates/steps/workload-publish.yml

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
parameters:
2+
- name: publishToFeed
3+
displayName: Publish to feed
4+
type: boolean
5+
default: false
6+
- name: feedForPublishing
7+
displayName: Feed for publishing
8+
type: string
9+
default: public/dotnet10-workloads
10+
11+
steps:
12+
- task: 1ES.PublishNuget@1
13+
condition: ${{ eq(parameters.publishToFeed, true) }}
14+
displayName: 🟣 Publish NuGet package
15+
inputs:
16+
useDotNetTask: true
17+
packagesToPush: $(Build.SourcesDirectory)/artifacts/packages/**/*.nupkg
18+
packageParentPath: $(Build.SourcesDirectory)/artifacts/packages
19+
publishVstsFeed: ${{ parameters.feedForPublishing }}
20+
nuGetFeedType: internal
21+
allowPackageConflicts: false
22+
publishPackageMetadata: true

0 commit comments

Comments
 (0)