forked from unoplatform/calculator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.vsts-ci.iOS.yml
118 lines (100 loc) · 3.6 KB
/
.vsts-ci.iOS.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
jobs:
- job: iOS
pool:
vmImage: macOS-11
variables:
- name: NUGET_PACKAGES
value: $(build.sourcesdirectory)/.nuget
- name: VersionCodeOffset
value: 400559 # last value for the APK release
- group: unoplatform.apple.ios.appstore.distribution
workspace:
clean: all
steps:
- template: build/uno-ci/canary-updater.yml
- template: build/uno-ci/gitversion.yml
- template: build/uno-ci/dotnet-install-mac.yml
- template: build/uno-ci/jdk-setup.yml
- task: UseDotNet@2
displayName: 'Use .Net Core runtime 3.1.201'
retryCountOnTaskFailure: 3
inputs:
packageType: runtime
version: 3.1.3
- task: InstallAppleCertificate@2
displayName: Install Certificate
inputs:
certSecureFile: UnoPlatform-Apple-Distribution.p12
certPwd: $(appleappstorecertificatepassword)
keychain: temp
deleteCert: true
- task: InstallAppleProvisioningProfile@1
displayName: Install Provisioning Profile
inputs:
provisioningProfileLocation: secureFiles
provProfileSecureFile: Uno_Calculator.mobileprovision
- task: InstallAppleProvisioningProfile@1
displayName: Install Provisioning Profile (Canary)
inputs:
provisioningProfileLocation: secureFiles
provProfileSecureFile: Uno_Calculator_Canary_iOS.mobileprovision
- bash: |
cd $(build.sourcesdirectory)/src/CalcManager
chmod +x build_ios.sh
./build_ios.sh
displayName: Build native CalcManager
- task: MSBuild@1
inputs:
solution: '$(build.sourcesdirectory)/src/build/build.csproj'
msbuildLocationMethod: version
msbuildVersion: latest
msbuildArchitecture: x86
msbuildArguments: /r /p:BuildPlatformTarget=iOS /bl:$(build.artifactstagingdirectory)/build.binlog
clean: false
maximumCpuCount: true
restoreNugetPackages: false
logProjectEvents: true
createLogFile: true
- bash: |
cd $(build.sourcesdirectory)/src/Calculator.mobile
dotnet publish -f net6.0-ios -c Release /p:ArchiveOnBuild=true /bl:$(build.artifactstagingdirectory)/build-net6.binlog "/p:InformationalVersion=$GITVERSION_INFORMATIONALVERSION"
displayName: 'Build iOS Binaries (net6)'
- task: CopyFiles@2
displayName: 'Publish iOS Binaries (net6)'
inputs:
SourceFolder: $(build.sourcesdirectory)/src/Calculator.Mobile/bin/Release/net6.0-ios
Contents: |
**/*.ipa
**/*.dSym/**
TargetFolder: $(build.artifactstagingdirectory)
CleanTargetFolder: false
OverWrite: false
flattenFolders: false
- task: MSBuild@1
inputs:
solution: '$(build.sourcesdirectory)/src/Calculator.iOS/Calculator.iOS.csproj'
msbuildLocationMethod: version
msbuildVersion: latest
msbuildArchitecture: x86
msbuildArguments: /r /p:Configuration=Release /p:Platform=iPhone /bl:$(build.artifactstagingdirectory)/build-xamarin.binlog "/p:InformationalVersion=$GITVERSION_INFORMATIONALVERSION"
clean: false
maximumCpuCount: true
restoreNugetPackages: false
logProjectEvents: true
createLogFile: true
- task: CopyFiles@2
displayName: 'Publish iOS Binaries'
inputs:
SourceFolder: $(build.sourcesdirectory)/src/Calculator.iOS/bin/iPhone/Release
Contents: '*.ipa'
TargetFolder: $(build.artifactstagingdirectory)
CleanTargetFolder: false
OverWrite: false
flattenFolders: false
- task: PublishBuildArtifacts@1
condition: always()
retryCountOnTaskFailure: 3
inputs:
PathtoPublish: $(build.artifactstagingdirectory)
ArtifactName: Uno-Calculator-iOS
ArtifactType: Container