forked from microsoft/react-native-gallery
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathci.yml
More file actions
80 lines (66 loc) · 1.95 KB
/
ci.yml
File metadata and controls
80 lines (66 loc) · 1.95 KB
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
schedules:
- cron: "0 0 * * *"
displayName: Nightly Build
branches:
include:
- main
batch: true
variables:
- group: rngallery_Variables
- name: BuildLogDirectory
value: $(Build.BinariesDirectory)\x64\BuildLogs
pool: windevbuildagents
steps:
- checkout: self
clean: false
- task: NuGetToolInstaller@0
inputs:
versionSpec: ">=5.8.0"
- task: NodeTool@0
displayName: Installing Node
inputs:
versionSpec: '14.x'
- task: CmdLine@2
displayName: Installing Yarm
inputs:
script: npm install -g yarn
- task: NuGetCommand@2
displayName: NuGet restore
inputs:
command: restore
restoreSolution: windows/rngallery.sln
verbosityRestore: Detailed
- task: CmdLine@2
displayName: midgard-yarn (faster yarn install)
inputs:
script: npx midgard-yarn@1.23.14 --pure-lockfile
- task: CmdLine@2
displayName: Lint and Type Checks
inputs:
script: yarn tsc | yarn lint
- task: DownloadSecureFile@1
name: signingCert
displayName: 'Download CA certificate'
inputs:
secureFile: 'rngallery_Key.pfx'
- task: CopyFiles@2
displayName: 'Copy Certificate to Windows Build Directory'
inputs:
SourceFolder: '$(signingCert.secureFilePath)'
Contents: 'rngallery_Key.pfx'
TargetFolder: '.\windows\rngallery\'
- task: CmdLine@2
displayName: Build project (Release)
timeoutInMinutes: 60
inputs:
script: npx --no-install react-native run-windows --arch x64 --no-deploy --logging --buildLogDirectory $BuildLogDirectory\Release --msbuildprops PackageCertificateKeyFile=$(signingCert.secureFilePath),PackageCertificatePassword=$(rngallery_Password) --release
- task: CmdLine@2
displayName: Remove the Pfx
inputs:
script: del /f .\windows\rngallery\rngallery_Key.pfx
- task: PublishBuildArtifacts@1
displayName: Upload App
condition: succeededOrFailed()
inputs:
pathtoPublish: .\windows\AppPackages\rngallery
artifactName: 'React Native Gallery - $(Agent.JobName)-$(System.JobAttempt)'