Skip to content
This repository was archived by the owner on Feb 23, 2024. It is now read-only.

Commit 0243b3f

Browse files
authored
Update main.yml
1 parent 0893c2d commit 0243b3f

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

.azure-pipelines/main.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,3 +142,35 @@ stages:
142142

143143
- task: PublishSecurityAnalysisLogs@3
144144
displayName: 'Publish security analysis logs'
145+
146+
- stage: release
147+
displayName: Release Toolkit
148+
dependsOn: [ 'postbuild' ]
149+
condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/'))
150+
jobs:
151+
- job: update_github_release
152+
displayName: Update GitHub Releases
153+
steps:
154+
- pwsh: |
155+
$tagVersion = $env:BUILD_SOURCEBRANCHNAME
156+
Write-Host "Tag version: $tagVersion"
157+
Write-Host "##vso[task.setvariable variable=githubReleaseVersion]$tagVersion"
158+
displayName: Get Release Name on GitHub
159+
160+
- pwsh: |
161+
New-Item -Path '$(Build.ArtifactStagingDirectory)/release' -Type Directory -Force
162+
displayName: Set up environment
163+
164+
- task: DownloadPipelineArtifact@2
165+
inputs:
166+
artifact: 'release'
167+
path: '$(Build.ArtifactStagingDirectory)/release'
168+
displayName: Download Release ZIP Packages
169+
170+
- task: GitHubRelease@1
171+
inputs:
172+
gitHubConnection: Github-adhal-azure-devops-resource-kit
173+
repositoryName: 'azure/azure-api-management-devops-resource-kit'
174+
tag: $(githubReleaseVersion)
175+
action: 'edit'
176+
assets: $(Build.ArtifactStagingDirectory)/release/*.zip

0 commit comments

Comments
 (0)