Skip to content

Commit c35aafa

Browse files
committed
Configure CI to use github release on tag
1 parent 38d5e7a commit c35aafa

File tree

1 file changed

+45
-10
lines changed

1 file changed

+45
-10
lines changed

.azure-pipelines.yml

Lines changed: 45 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,23 @@ jobs:
7979
# set -eux
8080
# scons tests godot_args="--verbose --video-driver GLES2"
8181
# displayName: 'Run tests'
82-
- bash: |
82+
- powershell: |
8383
scons release
84-
mkdir export && cp build/godot-python-*.zip export
84+
cp build/godot-python-*.zip $(Build.ArtifactStagingDirectory)
8585
displayName: 'Generate artifact archive'
86-
- publish: export/
87-
artifact: $(PLATFORM)_build
86+
- task: GithubRelease@0
87+
condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/'))
88+
inputs:
89+
gitHubConnection: 'github.com_touilleMan'
90+
repositoryName: 'touilleMan/godot-python'
91+
action: 'edit'
92+
target: '$(build.sourceVersion)'
93+
tagSource: 'manual'
94+
tag: '$(Build.SourceBranchName)'
95+
assets: '$(Build.ArtifactStagingDirectory)/godot-python-*.zip'
96+
title: '$(Build.SourceBranchName)'
97+
assetUploadMode: 'replace'
98+
addChangeLog: false
8899

89100

90101
#################################################################################
@@ -123,11 +134,23 @@ jobs:
123134
# scons tests
124135
# displayName: 'Run tests'
125136
- bash: |
137+
set -eux
126138
scons release
127-
mkdir export && cp build/godot-python-*.zip export
139+
cp build/godot-python-*.zip $(Build.ArtifactStagingDirectory)/
128140
displayName: 'Generate artifact archive'
129-
- publish: export/
130-
artifact: $(PLATFORM)_build
141+
- task: GithubRelease@0
142+
condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/'))
143+
inputs:
144+
gitHubConnection: 'github.com_touilleMan'
145+
repositoryName: 'touilleMan/godot-python'
146+
action: 'edit'
147+
target: '$(build.sourceVersion)'
148+
tagSource: 'manual'
149+
tag: '$(Build.SourceBranchName)'
150+
assets: '$(Build.ArtifactStagingDirectory)/godot-python-*.zip'
151+
title: '$(Build.SourceBranchName)'
152+
assetUploadMode: 'replace'
153+
addChangeLog: false
131154

132155

133156
#################################################################################
@@ -172,8 +195,20 @@ jobs:
172195
# scons tests
173196
# displayName: 'Run tests'
174197
- bash: |
198+
set -eux
175199
scons release
176-
mkdir export && cp build/godot-python-*.zip export
200+
cp build/godot-python-*.zip $(Build.ArtifactStagingDirectory)/
177201
displayName: 'Generate artifact archive'
178-
- publish: export/
179-
artifact: $(PLATFORM)_build
202+
- task: GithubRelease@0
203+
condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/'))
204+
inputs:
205+
gitHubConnection: 'github.com_touilleMan'
206+
repositoryName: 'touilleMan/godot-python'
207+
action: 'edit'
208+
target: '$(build.sourceVersion)'
209+
tagSource: 'manual'
210+
tag: '$(Build.SourceBranchName)'
211+
assets: '$(Build.ArtifactStagingDirectory)/godot-python-*.zip'
212+
title: '$(Build.SourceBranchName)'
213+
assetUploadMode: 'replace'
214+
addChangeLog: false

0 commit comments

Comments
 (0)