@@ -37,6 +37,11 @@ parameters:
37
37
type : boolean
38
38
default : true
39
39
40
+ # Whether the built packages contain nuget packages. If true, the publish stage will publish the nuget packages to the internal nuget feed.
41
+ - name : HasNugetPackages
42
+ type : boolean
43
+ default : false
44
+
40
45
# Indicates if the Publish stage should depend on the Test stage
41
46
- name : PublishDependsOnTest
42
47
type : boolean
@@ -57,7 +62,7 @@ parameters:
57
62
type : number
58
63
default : 10
59
64
60
- # Indicates if regenration matrix should only contain folders with typespec files
65
+ # Indicates if regeneration matrix should only contain folders with typespec files
61
66
- name : OnlyGenerateTypespec
62
67
type : boolean
63
68
default : false
@@ -126,6 +131,7 @@ extends:
126
131
-OutputDirectory "$(Build.ArtifactStagingDirectory)/packages"
127
132
-TargetNpmJsFeed:$${{ parameters.PublishPublic }}
128
133
-EmitterPackagePath:${{ parameters.EmitterPackagePath }}
134
+ -GeneratorVersion: $(initialize.emitterVersion)
129
135
130
136
- pwsh : |
131
137
$sourceBranch = '$(Build.SourceBranch)'
@@ -186,6 +192,16 @@ extends:
186
192
displayName: Publish to DevOps feed
187
193
workingDirectory: $(buildArtifactsPath)/packages
188
194
195
+ # Publish to https://dev.azure.com/azure-sdk/public/_packaging?_a=feed&feed=azure-sdk-for-net
196
+ - ${{ if parameters.HasNugetPackages }} :
197
+ - task : 1ES.PublishNuget@1
198
+ displayName : Publish NuGet Packages to DevOps feed
199
+ inputs :
200
+ packagesToPush : $(buildArtifactsPath)/packages/*.nupkg;!$(buildArtifactsPath)/packages/*.symbols.nupkg
201
+ packageParentPath : $(buildArtifactsPath)/packages
202
+ publishVstsFeed : " 29ec6040-b234-4e31-b139-33dc4287b756/fa8c16a3-dbe0-4de2-a297-03065ec1ba3f"
203
+ nuGetFeedType : internal
204
+
189
205
- ${{ if parameters.PublishPublic }} :
190
206
# publish to npmjs.org using ESRP
191
207
- task : EsrpRelease@9
@@ -244,7 +260,7 @@ extends:
244
260
--overrides '$(buildArtifactsPath)/packages/overrides.json'
245
261
} else {
246
262
Write-Host "No overrides.json found. Running tsp-client without overrides."
247
-
263
+
248
264
tsp-client generate-config-files `
249
265
--package-json '$(buildArtifactsPath)/lock-files/package.json' `
250
266
--emitter-package-json-path '${{ parameters.EmitterPackageJsonOutputPath }}'
0 commit comments