-
Notifications
You must be signed in to change notification settings - Fork 118
/
azure-pipelines.yml
128 lines (124 loc) · 4.36 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
# Azure Pipelines CI setup for cross-platform builds of Tad desktop app
#
# Set up triggers in GUI
name: $(Build.Reason)_$(Build.SourceBranch)_$(Rev:r)
# If we want to trigger on commits to master:
# trigger:
# - master
jobs:
- job: Windows
timeoutInMinutes: 45
pool:
vmImage: windows-latest
steps:
- task: NodeTool@0
inputs:
versionSpec: 16.x
displayName: "Use node.js 16"
- script: curl.exe -o openssl-1.1.1q.zip https://www.antonycourtney.com/files/openssl-win64/openssl-1.1.1q.zip
displayName: "download OpenSSL"
- script: mkdir .\openssl-1.1.1q
displayName: "make openssl dir"
- script: tar -xzf openssl-1.1.1q.zip -C .\openssl-1.1.1q --strip-components=1
displayName: "extract openssl"
- script: npm install
displayName: "Install top-level npm dependencies"
- script: npm run bootstrap
displayName: "Run lerna bootstrapping"
- script: node tools/buildAll.js
displayName: "Build all packages"
- script: npm run publish
workingDirectory: packages/tad-app
displayName: "Build packaged tad-app with electron-builder"
env:
{
OPENSSL_ROOT_DIR: $(System.DefaultWorkingDirectory)/openssl-1.1.1q/x64,
GITHUB_TOKEN: $(GITHUB_TOKEN),
}
- task: CopyFiles@2
inputs:
sourceFolder: "packages/tad-app/dist"
contents: "*"
targetFolder: $(Build.ArtifactStagingDirectory)
- task: PublishBuildArtifacts@1
inputs:
pathToPublish: $(Build.ArtifactStagingDirectory)
artifactName: WindowsBuildOutputs
- job: Linux
timeoutInMinutes: 55
pool:
vmImage: ubuntu-latest
steps:
- task: NodeTool@0
inputs:
versionSpec: 16.x
displayName: "Use node.js 16"
- script: npm install
displayName: "Install top-level npm dependencies"
- script: npm run bootstrap
displayName: "Run lerna bootstrapping"
- script: "node ./tools/buildAll.js"
displayName: "Build all packages"
- script: "( cd packages/tad-app && BUILD_BUILDNUMBER='' npm run publish )"
displayName: "Build packaged tad-app with electron-builder"
env:
{
BUILDNUMBER: " ",
BUILD_BUILDNUMBER: " ",
CI_PIPELINE_IID: " ",
GITHUB_TOKEN: $(GITHUB_TOKEN),
}
- task: CopyFiles@2
inputs:
contents: "packages/tad-app/dist/tad*"
targetFolder: $(Build.ArtifactStagingDirectory)
- task: PublishBuildArtifacts@1
inputs:
pathToPublish: $(Build.ArtifactStagingDirectory)
artifactName: LinuxBuildOutputs
- job: macOS_latest
timeoutInMinutes: 55
pool:
vmImage: macOS-latest
steps:
- task: NodeTool@0
inputs:
versionSpec: 16.x
displayName: "Use node.js 16"
- task: DownloadSecureFile@1
name: devCertificate
displayName: "Download Apple Dev Certificate"
inputs:
secureFile: "apple-dev-certificate.p12"
- script: HOMEBREW_NO_AUTO_UPDATE=1 brew install openssl@3
displayName: "Install openssl from homebrew"
- script: HOMEBREW_NO_AUTO_UPDATE=1 brew install jq
displayName: "Install jq from homebrew"
- script: npm install
displayName: "Install top-level npm dependencies"
- script: npm run bootstrap
displayName: "Run lerna bootstrapping"
- script: "node ./tools/buildAll.js"
displayName: "Build all packages"
- script: "( cd packages/tad-app && npm run publish )"
displayName: "Build packaged tad-app with electron-builder"
env:
{
APPLEID: $(APPLEID),
APPLEIDPASS: $(APPLEIDPASS),
CSC_LINK: $(devCertificate.secureFilePath),
CSC_KEY_PASSWORD: $(APPLEIDPASS),
GH_TOKEN: $(GITHUB_TOKEN),
}
- task: CopyFiles@2
inputs:
contents: "packages/tad-app/dist/Tad*.zip"
targetFolder: $(Build.ArtifactStagingDirectory)
- task: CopyFiles@2
inputs:
contents: "packages/tad-app/dist/Tad*.dmg"
targetFolder: $(Build.ArtifactStagingDirectory)
- task: PublishBuildArtifacts@1
inputs:
pathToPublish: $(Build.ArtifactStagingDirectory)
artifactName: MacOSBuildOutputs