Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add draft github release step to pipeline #393

Merged
merged 2 commits into from
Nov 10, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions azure-pipelines-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
pool:
vmImage: 'ubuntu-latest'

# Only run when main build pipeline completes, and only for main branch builds
trigger: none
resources:
pipelines:
- pipeline: build
source: EverestAPI.Everest
trigger:
branches:
include:
- dev

steps:
# Download artifacts from build pipeline
- task: DownloadBuildArtifacts@1
inputs:
buildType: specific
project: Everest
pipeline: EverestAPI.Everest
specificBuildWithTriggering: true
downloadType: specific
downloadPath: $(Build.ArtifactStagingDirectory)

# Define build_number variable and zip build artifacts
- script: |
declare -i BUILD_NUMBER=$(Build.BuildId)+$(Build.BuildIdOffset)
echo "##vso[task.setvariable variable=build_number]$BUILD_NUMBER"

zip -r $(Build.ArtifactStagingDirectory)/main.zip $(Build.ArtifactStagingDirectory)/main/
zip -r $(Build.ArtifactStagingDirectory)/olympus-meta.zip $(Build.ArtifactStagingDirectory)/olympus-meta/
zip -r $(Build.ArtifactStagingDirectory)/olympus-build.zip $(Build.ArtifactStagingDirectory)/olympus-build/
zip -r $(Build.ArtifactStagingDirectory)/lib-stripped.zip $(Build.ArtifactStagingDirectory)/lib-stripped/

# Create GitHub release for new stable versions.
- task: GitHubRelease@1
displayName: 'Create GitHub Release'
condition: succeeded()
inputs:
githubConnection: 0x0ade-bot
repositoryName: EverestAPI/Everest
action: 'create'
target: '$(Build.SourceVersion)'
tagSource: 'userSpecifiedTag'
tag: 'stable-1.$(build_number).0'
title: 'Stable Build $(build_number)'
assets: |
'$(Build.ArtifactStagingDirectory)/main.zip'
'$(Build.ArtifactStagingDirectory)/olympus-meta.zip'
'$(Build.ArtifactStagingDirectory)/olympus-build.zip'
'$(Build.ArtifactStagingDirectory)/lib-stripped.zip'
isDraft: true