@@ -213,41 +213,13 @@ extends:
213
213
pool :
214
214
vmImage : ubuntu-latest
215
215
steps :
216
- - pwsh : |
217
- $artifactName = Get-ChildItem -Path $(Pipeline.Workspace)\Nugets -Filter Microsoft.OpenApi.*.nupkg -recurse | select -First 1
218
- $artifactVersion= $artifactName.Name -replace "Microsoft.OpenApi.", "" -replace ".nupkg", ""
219
- #Set Variable $artifactName and $artifactVersion
220
- Write-Host "##vso[task.setvariable variable=artifactVersion; isSecret=false; isOutput=true]$artifactVersion"
221
- Write-Host "##vso[task.setvariable variable=artifactName; isSecret=false; isOutput=true]$artifactName.FullName"
222
- echo "$artifactName"
223
- echo "$artifactVersion"
224
- displayName: 'Fetch Artifact Name'
225
216
- task : 1ES.PublishNuget@1
226
217
displayName : ' NuGet push'
227
218
inputs :
228
219
packagesToPush : ' $(Pipeline.Workspace)/Nugets/Microsoft.OpenApi.Hidi.*.nupkg'
229
220
packageParentPath : ' $(Pipeline.Workspace)'
230
221
nuGetFeedType : external
231
222
publishFeedCredentials : ' OpenAPI Nuget Connection'
232
- - task : GitHubRelease@1
233
- displayName : ' GitHub release (edit)'
234
- condition : succeededOrFailed()
235
- inputs :
236
- gitHubConnection : ' Github-MaggieKimani1'
237
- action : edit
238
- tagSource : userSpecifiedTag
239
- tag : ' $(artifactVersion)'
240
- title : ' $(artifactVersion)'
241
- releaseNotesSource : inline
242
- assets : ' $(Pipeline.Workspace)\**\*.exe'
243
- changeLogType : issueBased
244
- changeLogLabels : ' [
245
- { "label" : "feature-work", "feature", "displayName" : "New Features", "state" : "closed" },
246
- { "label" : "enhancement", "V2-Enhancement", "displayName" : "Enhancements", "state" : "closed" },
247
- { "label" : "bug", "bug-fix", "displayName" : "Bugs", "state" : "closed" },
248
- { "label" : "documentation", "doc", "displayName" : "Documentation", "state" : "closed"},
249
- { "label" : "dependencies", "displayName" : "Package Updates", "state" : "closed" }
250
- ]'
251
223
252
224
- deployment : deploy_lib
253
225
templateContext :
@@ -303,4 +275,49 @@ extends:
303
275
packagesToPush : ' $(Pipeline.Workspace)/Nugets/Microsoft.OpenApi.Readers.*.nupkg'
304
276
packageParentPath : ' $(Pipeline.Workspace)'
305
277
nuGetFeedType : external
306
- publishFeedCredentials : ' OpenAPI Nuget Connection'
278
+ publishFeedCredentials : ' OpenAPI Nuget Connection'
279
+
280
+ - deployment : create_github_release
281
+ templateContext :
282
+ type : releaseJob
283
+ isProduction : true
284
+ inputs :
285
+ - input : pipelineArtifact
286
+ artifactName : Nugets
287
+ targetPath : ' $(Pipeline.Workspace)'
288
+ dependsOn : []
289
+ environment : kiota-github-releases
290
+ strategy :
291
+ runOnce :
292
+ deploy :
293
+ pool :
294
+ vmImage : ubuntu-latest
295
+ steps :
296
+ - pwsh : |
297
+ $artifactName = Get-ChildItem -Path $(Pipeline.Workspace)\Nugets -Filter Microsoft.OpenApi.*.nupkg -recurse | select -First 1
298
+ $artifactVersion= $artifactName.Name -replace "Microsoft.OpenApi.", "" -replace ".nupkg", ""
299
+ #Set Variable $artifactName and $artifactVersion
300
+ Write-Host "##vso[task.setvariable variable=artifactVersion; isSecret=false; isOutput=true]$artifactVersion"
301
+ echo "$artifactVersion"
302
+ displayName: 'Fetch Artifact Name'
303
+ name: getTagVersion
304
+ - task : GitHubRelease@1
305
+ displayName : ' GitHub release (edit)'
306
+ condition : succeededOrFailed()
307
+ inputs :
308
+ gitHubConnection : ' Github-MaggieKimani1'
309
+ action : create
310
+ tagSource : userSpecifiedTag
311
+ tag : ' $(getTagVersion.artifactVersion)'
312
+ title : ' $(getTagVersion.artifactVersion)'
313
+ releaseNotesSource : inline
314
+ assets : ' $(Pipeline.Workspace)\**\*.exe'
315
+ changeLogType : issueBased
316
+ changeLogLabels : ' [
317
+ { "label" : "feature-work", "feature", "displayName" : "New Features", "state" : "closed" },
318
+ { "label" : "enhancement", "V2-Enhancement", "displayName" : "Enhancements", "state" : "closed" },
319
+ { "label" : "bug", "bug-fix", "displayName" : "Bugs", "state" : "closed" },
320
+ { "label" : "documentation", "doc", "displayName" : "Documentation", "state" : "closed"},
321
+ { "label" : "dependencies", "displayName" : "Package Updates", "state" : "closed" }
322
+ ]'
323
+
0 commit comments