@@ -265,6 +265,41 @@ extends:
265265 nuGetFeedType : external
266266 publishFeedCredentials : ' OpenAPI Nuget Connection'
267267
268+ - deployment : create_github_release
269+ condition : and(contains(variables['build.SourceBranch'], 'refs/tags/v'), succeeded())
270+ templateContext :
271+ type : releaseJob
272+ isProduction : true
273+ inputs :
274+ - input : pipelineArtifact
275+ artifactName : Nugets
276+ targetPath : ' $(Pipeline.Workspace)'
277+ dependsOn : []
278+ environment : kiota-github-releases
279+ strategy :
280+ runOnce :
281+ deploy :
282+ pool :
283+ vmImage : ubuntu-latest
284+ steps :
285+ - pwsh : |
286+ $artifactName = Get-ChildItem -Path $(Pipeline.Workspace) -Filter Microsoft.OpenApi.*.nupkg -recurse | select -First 1
287+ $artifactVersion= $artifactName.Name -replace "Microsoft.OpenApi.", "" -replace ".nupkg", ""
288+ #Set Variable $artifactName and $artifactVersion
289+ Write-Host "##vso[task.setvariable variable=artifactVersion; isSecret=false;]$artifactVersion"
290+ echo "$artifactVersion"
291+ displayName: 'Fetch Artifact Name'
292+ - task : GitHubRelease@1
293+ displayName : ' GitHub release (edit)'
294+ condition : succeededOrFailed()
295+ inputs :
296+ gitHubConnection : ' Github-MaggieKimani1'
297+ action : edit
298+ tagSource : userSpecifiedTag
299+ tag : ' v$(artifactVersion)'
300+ releaseNotesSource : inline
301+ addChangeLog : false
302+
268303# once the nuget has been released, fill this form to get the public documentation updated.
269304# https://dev.azure.com/msft-skilling/Content/_workitems/create/User%20Story?templateId=39fb91e3-64a2-4c8a-83db-b2bdf3603dd3&ownerId=c4a28f90-17ae-4384-b514-7273392b082b
270305# https://learn.microsoft.com/en-us/dotnet/api/microsoft.openapi
0 commit comments