Skip to content

Commit 319f217

Browse files
authored
Migrate GitHub release task to explicit release job (#611)
* Migrate GitHub release task to explicit release job Introduces a new gitHubReleaseJob to the release pipeline for publishing artifacts to GitHub. Updates artifact naming and asset paths to align with the new job structure.
1 parent 30c2b5a commit 319f217

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

Pipelines/appinspector-release.yml

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ extends:
132132
outputs:
133133
- output: pipelineArtifact
134134
path: '$(Build.StagingDirectory)'
135-
artifact: 'Signed_Binaries_$(System.JobId)_$(System.JobAttempt)'
135+
artifact: 'Signed_Binaries'
136136
# see https://eng.ms/docs/cloud-ai-platform/devdiv/one-engineering-system-1es/1es-docs/1es-pipeline-templates/features/outputs/nuget-packages
137137
- output: nuget
138138
useDotNetTask: false
@@ -597,6 +597,19 @@ extends:
597597
script: |
598598
mv $env:BUILD_BINARIESDIRECTORY/*.nupkg $env:BUILD_STAGINGDIRECTORY/
599599
mv $env:BUILD_BINARIESDIRECTORY/*.snupkg $env:BUILD_STAGINGDIRECTORY/
600+
- job: gitHubReleaseJob
601+
# Based on Documentation: https://eng.ms/docs/cloud-ai-platform/devdiv/one-engineering-system-1es/1es-docs/1es-pipeline-templates/features/releasepipelines/releaseworkflows/releasejob?tabs=standardreleasejob
602+
displayName: GitHub Release Job
603+
# pool: you can optionally specify pool as you would normally do for a standard job
604+
templateContext:
605+
type: releaseJob # Required, this indicates this job is a release job
606+
isProduction: true # Required, must be 'true' or 'false'
607+
inputs: # All input build artifacts must be declared here
608+
- input: pipelineArtifact # Required, type of the input artifact
609+
artifactName: Signed_Binaries # Required, name of the pipeline artifact
610+
targetPath: $(Pipeline.Workspace)/drop # Optional, specifies where the artifact is downloaded
611+
steps:
612+
- template: nbgv-set-version-steps.yml@templates
600613
- task: GitHubRelease@1
601614
displayName: Release to GitHub
602615
inputs:
@@ -609,7 +622,7 @@ extends:
609622
title: 'Release v$(ReleaseVersion)'
610623
releaseNotesSource: 'inline'
611624
assets: |
612-
$(Build.StagingDirectory)/*.zip
613-
$(Build.StagingDirectory)/HASHES.txt
625+
$(Pipeline.Workspace)/drop/*.zip
626+
$(Pipeline.Workspace)/drop/HASHES.txt
614627
changeLogCompareToRelease: 'lastNonDraftRelease'
615628
changeLogType: 'commitBased'

0 commit comments

Comments
 (0)