This repository has been archived by the owner on Feb 4, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
/
azure-pipelines.yml
153 lines (153 loc) · 4.65 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
trigger:
branches:
include:
- master
- dev
tags:
include:
- v*
jobs:
- job: Windows
pool:
vmImage: "windows-latest"
steps:
- template: 'build/setup-variables.yml'
- template: 'build/setup-signing-key.yml'
- task: NodeTool@0
inputs:
versionSpec: '16.x'
displayName: 'Install Node.js'
- bash: |
cd packages/protocols
yarn
yarn build
cd ../core
yarn
yarn build
cd ../core-backend
yarn
yarn build
cd ../intiface
export GH_TOKEN="$(GH_TOKEN)"
export CSC_LINK="$(System.DefaultWorkingDirectory)\SigningCert.pfx"
export CSC_KEY_PASSWORD="$(NPLabsRepoSigningKey)"
yarn
yarn electron:build
displayName: 'yarn build (powershell)'
condition: eq(variables['Agent.OS'], 'Windows_NT')
- task: CopyFiles@2
displayName: "Copy frozen executables to staging"
inputs:
sourceFolder: '$(System.DefaultWorkingDirectory)/packages/intiface/dist_electron'
contents: |
intiface-desktop*
latest*.yml
targetFolder: '$(Build.ArtifactStagingDirectory)'
flattenFolders: true
- task: PublishPipelineArtifact@0
displayName: "Publish frozen executables to artifacts"
inputs:
targetPath: '$(Build.ArtifactStagingDirectory)'
artifactName: 'intiface-desktop-win'
- job: MacOS
pool:
vmImage: 'macos-latest'
steps:
- template: 'build/setup-variables.yml'
- template: 'build/setup-mac-signing-key.yml'
- task: NodeTool@0
inputs:
versionSpec: '16.x'
displayName: 'Install Node.js'
- bash: |
cd packages/protocols
yarn
yarn build
cd ../core
yarn
yarn build
cd ../core-backend
yarn
yarn build
cd ../intiface
export GH_TOKEN="$(GH_TOKEN)"
yarn
yarn electron:build
displayName: 'yarn build'
- task: CopyFiles@2
displayName: "Copy frozen executables to staging"
inputs:
sourceFolder: '$(System.DefaultWorkingDirectory)/packages/intiface/dist_electron'
contents: |
intiface-desktop*
latest*.yml
targetFolder: '$(Build.ArtifactStagingDirectory)'
flattenFolders: true
- task: PublishPipelineArtifact@0
displayName: "Publish frozen executables to artifacts"
inputs:
targetPath: '$(Build.ArtifactStagingDirectory)'
artifactName: 'intiface-desktop-mac'
- job: Linux
pool:
vmImage: 'ubuntu-latest'
steps:
- template: 'build/setup-variables.yml'
- task: NodeTool@0
inputs:
versionSpec: '16.x'
displayName: 'Install Node.js'
- bash: |
cd packages/protocols
yarn
yarn build
cd ../core
yarn
yarn build
cd ../core-backend
yarn
yarn build
cd ../intiface
export GH_TOKEN="$(GH_TOKEN)"
export CSC_LINK="$(System.DefaultWorkingDirectory)\SigningCert.pfx"
export CSC_KEY_PASSWORD="$(NPLabsRepoSigningKey)"
yarn
yarn electron:build
displayName: 'yarn build'
- task: CopyFiles@2
displayName: "Copy frozen executables to staging"
inputs:
sourceFolder: '$(System.DefaultWorkingDirectory)/packages/intiface/dist_electron'
contents: |
intiface-desktop*
latest*.yml
targetFolder: '$(Build.ArtifactStagingDirectory)'
flattenFolders: true
- task: PublishPipelineArtifact@0
displayName: "Publish frozen executables to artifacts"
inputs:
targetPath: '$(Build.ArtifactStagingDirectory)'
artifactName: 'intiface-desktop-linux'
- job: Deploy
dependsOn:
- Windows
- MacOS
- Linux
condition: and(succeeded(), contains(variables['Build.SourceBranch'], 'refs/tags/'))
pool:
vmImage: 'windows-latest'
steps:
- task: DownloadPipelineArtifact@1
displayName: Download Artifacts from other jobs
inputs:
buildType: 'current'
- task: GitHubRelease@0
displayName: Upload release to Github
inputs:
gitHubConnection: "release"
repositoryName: "intiface/intiface-desktop"
action: "create"
tagSource: "auto"
title: 'Intiface Desktop Release $(gitVersion)'
assets: "$(System.ArtifactsDirectory)/**/*"
isPreRelease: false