Skip to content

Commit

Permalink
Add draft github release step to pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
coloursofnoise committed Oct 25, 2021
1 parent 5855e18 commit b144037
Showing 1 changed file with 30 additions and 1 deletion.
31 changes: 30 additions & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,38 @@ steps:
artifactName: 'lib-stripped'
publishLocation: 'Container'

# Announce new stable versions on Discord (#modding_updates).
# 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/meta/
zip -r $(Build.ArtifactStagingDirectory)/lib-stripped.zip $(Build.ArtifactStagingDirectory)/lib-stripped/build/
# Create GitHub release for new stable versions.
- task: GitHubRelease@1
displayName: 'Create GitHub Release'
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/dev'))
inputs:
githubConnection: 0x0ade-bot
repositoryName: EverestAPI/Everest
action: 'create'
target: '$(Build.SourceVersion)'
tagSource: 'userSpecifiedTag'
tag: 'v1.$(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

# Announce new stable versions on Discord (#modding_updates).
- script: |
declare -i BUILD_NUMBER=$(build_number)
curl -H "Content-Type: application/json" -d "{\"content\": \"**A new Everest stable was just released!**\nThe latest stable version is now **$BUILD_NUMBER**.\"}" $(WEBHOOK_URL)
displayName: 'Celeste Discord webhook'
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/stable'))

0 comments on commit b144037

Please sign in to comment.