@@ -213,40 +213,13 @@ extends:
213213 pool :
214214 vmImage : ubuntu-latest
215215 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- echo "$artifactVersion"
222- displayName: 'Fetch Artifact Name'
223- name: getTagVersion
224216 - task : 1ES.PublishNuget@1
225217 displayName : ' NuGet push'
226218 inputs :
227219 packagesToPush : ' $(Pipeline.Workspace)/Nugets/Microsoft.OpenApi.Hidi.*.nupkg'
228220 packageParentPath : ' $(Pipeline.Workspace)'
229221 nuGetFeedType : external
230222 publishFeedCredentials : ' OpenAPI Nuget Connection'
231- - task : GitHubRelease@1
232- displayName : ' GitHub release (edit)'
233- condition : succeededOrFailed()
234- inputs :
235- gitHubConnection : ' Github-MaggieKimani1'
236- action : create
237- tagSource : userSpecifiedTag
238- tag : ' $(getTagVersion.artifactVersion)'
239- title : ' $(getTagVersion.artifactVersion)'
240- releaseNotesSource : inline
241- assets : ' $(Pipeline.Workspace)\**\*.exe'
242- changeLogType : issueBased
243- changeLogLabels : ' [
244- { "label" : "feature-work", "feature", "displayName" : "New Features", "state" : "closed" },
245- { "label" : "enhancement", "V2-Enhancement", "displayName" : "Enhancements", "state" : "closed" },
246- { "label" : "bug", "bug-fix", "displayName" : "Bugs", "state" : "closed" },
247- { "label" : "documentation", "doc", "displayName" : "Documentation", "state" : "closed"},
248- { "label" : "dependencies", "displayName" : "Package Updates", "state" : "closed" }
249- ]'
250223
251224 - deployment : deploy_lib
252225 templateContext :
@@ -302,4 +275,49 @@ extends:
302275 packagesToPush : ' $(Pipeline.Workspace)/Nugets/Microsoft.OpenApi.Readers.*.nupkg'
303276 packageParentPath : ' $(Pipeline.Workspace)'
304277 nuGetFeedType : external
305- 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