From c35aafa4f74b2d954511f06e4dd48608c075c0e1 Mon Sep 17 00:00:00 2001 From: Emmanuel Leblond Date: Sun, 10 May 2020 14:25:58 +0200 Subject: [PATCH] Configure CI to use github release on tag --- .azure-pipelines.yml | 55 ++++++++++++++++++++++++++++++++++++-------- 1 file changed, 45 insertions(+), 10 deletions(-) diff --git a/.azure-pipelines.yml b/.azure-pipelines.yml index fc7df8d0..76c88527 100644 --- a/.azure-pipelines.yml +++ b/.azure-pipelines.yml @@ -79,12 +79,23 @@ jobs: # set -eux # scons tests godot_args="--verbose --video-driver GLES2" # displayName: 'Run tests' - - bash: | + - powershell: | scons release - mkdir export && cp build/godot-python-*.zip export + cp build/godot-python-*.zip $(Build.ArtifactStagingDirectory) displayName: 'Generate artifact archive' - - publish: export/ - artifact: $(PLATFORM)_build + - task: GithubRelease@0 + condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/')) + inputs: + gitHubConnection: 'github.com_touilleMan' + repositoryName: 'touilleMan/godot-python' + action: 'edit' + target: '$(build.sourceVersion)' + tagSource: 'manual' + tag: '$(Build.SourceBranchName)' + assets: '$(Build.ArtifactStagingDirectory)/godot-python-*.zip' + title: '$(Build.SourceBranchName)' + assetUploadMode: 'replace' + addChangeLog: false ################################################################################# @@ -123,11 +134,23 @@ jobs: # scons tests # displayName: 'Run tests' - bash: | + set -eux scons release - mkdir export && cp build/godot-python-*.zip export + cp build/godot-python-*.zip $(Build.ArtifactStagingDirectory)/ displayName: 'Generate artifact archive' - - publish: export/ - artifact: $(PLATFORM)_build + - task: GithubRelease@0 + condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/')) + inputs: + gitHubConnection: 'github.com_touilleMan' + repositoryName: 'touilleMan/godot-python' + action: 'edit' + target: '$(build.sourceVersion)' + tagSource: 'manual' + tag: '$(Build.SourceBranchName)' + assets: '$(Build.ArtifactStagingDirectory)/godot-python-*.zip' + title: '$(Build.SourceBranchName)' + assetUploadMode: 'replace' + addChangeLog: false ################################################################################# @@ -172,8 +195,20 @@ jobs: # scons tests # displayName: 'Run tests' - bash: | + set -eux scons release - mkdir export && cp build/godot-python-*.zip export + cp build/godot-python-*.zip $(Build.ArtifactStagingDirectory)/ displayName: 'Generate artifact archive' - - publish: export/ - artifact: $(PLATFORM)_build + - task: GithubRelease@0 + condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/')) + inputs: + gitHubConnection: 'github.com_touilleMan' + repositoryName: 'touilleMan/godot-python' + action: 'edit' + target: '$(build.sourceVersion)' + tagSource: 'manual' + tag: '$(Build.SourceBranchName)' + assets: '$(Build.ArtifactStagingDirectory)/godot-python-*.zip' + title: '$(Build.SourceBranchName)' + assetUploadMode: 'replace' + addChangeLog: false