-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathazure-pipelines.yml
70 lines (60 loc) · 1.78 KB
/
azure-pipelines.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
trigger:
branches:
include:
- "*"
tags:
include:
- v*
paths:
exclude:
- README.adoc
- LICENSE
jobs:
- job: Linux
pool:
vmImage: ubuntu-latest
steps:
- bash: $SYSTEM_DEFAULTWORKINGDIRECTORY/build.sh $BUILD_ARTIFACTSTAGINGDIRECTORY/patcher-linux-x64
displayName: 'Build'
- task: PublishBuildArtifacts@1
displayName: Upload binary to artifacts
inputs:
artifactName: patcher
pathToPublish: $(Build.ArtifactStagingDirectory)
- job: Windows
pool:
vmImage: windows-latest
steps:
- script: |
call "%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
call "build.bat" release
move %SYSTEM_DEFAULTWORKINGDIRECTORY%\build\patcher.exe %BUILD_ARTIFACTSTAGINGDIRECTORY%\patcher-windows-x64.exe
displayName: Build
- task: PublishBuildArtifacts@1
displayName: Upload binary to artifacts
inputs:
artifactName: patcher
pathToPublish: $(Build.ArtifactStagingDirectory)
- job: Release
displayName: Create GitHub Release
pool:
vmImage: ubuntu-latest
dependsOn:
- Windows
- Linux
steps:
- task: DownloadBuildArtifacts@0
inputs:
downloadType: specific
- bash: |
export RELEASE_TAG=$(git describe)
echo "##vso[task.setvariable variable=release_tag]$RELEASE_TAG"
displayName: Set release tag
- task: GitHubRelease@1
condition: startswith(variables['Build.SourceBranch'], 'refs/tags/')
displayName: Create GitHub release
inputs:
gitHubConnection: releases
title: $(release_tag)
tagPattern: ^v(\d+\.)+(\d+\.)+(\*|\d+)$
assets: $(System.ArtifactsDirectory)/patcher/*