-
-
Notifications
You must be signed in to change notification settings - Fork 104
/
azure-pipelines.yml
178 lines (151 loc) · 5.27 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
trigger:
branches:
include:
- "*"
tags:
include:
- "*"
exclude:
- "continuous"
pr:
- "*"
variables:
isGitTag: $[startsWith(variables['Build.SourceBranch'], 'refs/tags/')]
gitTag: $[replace(replace(variables['Build.SourceBranch'], 'refs/tags/', ''), 'refs/heads/', '')]
gitTagNoV: $[replace(replace(replace(variables['Build.SourceBranch'], 'refs/tags/v', ''), 'refs/heads', ''), '/', '')]
isMaster: $[eq(variables['Build.SourceBranch'], 'refs/heads/master')]
stages:
- stage: Build
jobs:
- job: Win32
displayName: Win32
pool:
vmImage: "windows-latest"
steps:
- checkout: self
submodules: recursive
- bash: |
source ci/win32.deps.sh
- bash: |
source ci/win32.build.sh
- bash: |
source ci/win32.deploy.sh
displayName: Build
- task: PublishPipelineArtifact@1
inputs:
targetPath: "$(Build.ArtifactStagingDirectory)"
artifactName: Windows
- job: AppImage
displayName: AppImage
pool:
vmImage: "ubuntu-latest"
steps:
- checkout: self
submodules: recursive
- bash: |
source ci/appimage.deps.sh
- bash: |
source ci/appimage.build.sh
- bash: |
source ci/appimage.deploy.sh
- task: PublishPipelineArtifact@1
inputs:
targetPath: "$(Build.ArtifactStagingDirectory)/"
artifactName: Linux
- job: macOS
displayName: macOS
pool:
vmImage: "macos-13"
variables:
- group: macos
steps:
- checkout: self
submodules: recursive
- task: DownloadSecureFile@1
name: codesign
displayName: "Download codesign certificate"
inputs:
secureFile: "ossia-cert.p12"
- bash: |
source ci/osx-package.deps.sh
env:
MACOS_ARCH: "x86_64"
MAC_CODESIGN_PASSWORD: $(codesign)
MAC_ALTOOL_PASSWORD: $(altool)
- bash: |
source ci/osx-package.build.sh
env:
MACOS_ARCH: "x86_64"
- bash: |
source ci/osx-package.deploy.sh
env:
MACOS_ARCH: "x86_64"
MAC_CODESIGN_PASSWORD: $(codesign)
MAC_ALTOOL_PASSWORD: $(altool)
CI_IS_AZURE: 1
- task: PublishPipelineArtifact@1
inputs:
targetPath: "$(Build.ArtifactStagingDirectory)"
artifactName: macOS-x86_64
- job: Tarball
displayName: Tarball
pool:
vmImage: "ubuntu-latest"
steps:
- checkout: self
submodules: recursive
- task: DownloadSecureFile@1
name: pubkey
displayName: "Download CA certificate"
inputs:
secureFile: "sign-ossia-travis.pub.asc"
- task: DownloadSecureFile@1
name: privkey
displayName: "Download CA certificate"
inputs:
secureFile: "sign-ossia-travis.priv.asc"
- bash: |
source ci/tarball.build.sh
- bash: |
source ci/tarball.deploy.sh
- task: PublishPipelineArtifact@1
inputs:
targetPath: "$(Build.ArtifactStagingDirectory)"
artifactName: Source
- stage: Upload
condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest'))
jobs:
- job:
pool:
vmImage: "ubuntu-20.04"
steps:
- checkout: none
- task: DownloadPipelineArtifact@2
inputs:
source: "current"
path: "$(System.DefaultWorkingDirectory)"
- bash: |
cd "$(System.DefaultWorkingDirectory)"
find . -type f -exec mv {} . \;
ls
gh release delete-asset -y continuous ossia.score-master-macOS-Intel.dmg || true
gh release delete-asset -y continuous mac-sdk || true
gh release delete-asset -y continuous ossia.score-master-win64.exe || true
gh release delete-asset -y continuous windows-sdk.zip || true
gh release delete-asset -y continuous ossia.score-master-linux-amd64.AppImage || true
gh release delete-asset -y continuous linux-sdk.zip || true
gh release delete-asset -y continuous "ossia score-master-macOS-Intel.dmg" || true
gh release delete-asset -y continuous "ossia score-master-win64.exe" || true
gh release delete-asset -y continuous "ossia score-master-linux-amd64.AppImage" || true
- task: GitHubRelease@1
condition: and(succeeded(), eq(variables.isGitTag, true))
inputs:
gitHubConnection: github.com_jcelerier
repositoryName: ossia/score
action: "edit"
target: "$(Build.SourceVersion)"
tag: "$(gitTag)"
assets: "$(System.DefaultWorkingDirectory)/*"
tagSource: userSpecifiedTag
title: "$(gitTag)"
assetUploadMode: "replace"