/
azure-pipelines.yml
79 lines (70 loc) · 2.76 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
trigger:
- master
- previous/*
variables:
VERBOSITY: normal
API_TOOLS_VERSION: 1.1.0-preview.1
CAKE_VERSION: 0.35.0
DOTNET_CORE_VERSION: 3.0.x
strategy:
matrix:
macos:
imageName: 'Hosted macOS'
MONO_VERSION: 6_4_0
XCODE_VERSION: 11
windows:
imageName: 'Hosted Windows 2019 with VS2019'
pool:
name: $(imageName)
steps:
- bash: sudo $(Agent.HomeDirectory)/scripts/select-xamarin-sdk.sh $(MONO_VERSION)
displayName: 'Switch to the latest Xamarin SDK'
condition: eq(variables['System.JobName'], 'macos')
- bash: echo '##vso[task.setvariable variable=MD_APPLE_SDK_ROOT;]'/Applications/Xcode_$(XCODE_VERSION).app;sudo xcode-select --switch /Applications/Xcode_$(XCODE_VERSION).app/Contents/Developer
displayName: 'Switch to the latest Xcode'
condition: eq(variables['System.JobName'], 'macos')
- bash: echo '##vso[task.setvariable variable=PATH;]'$PATH:$HOME/.dotnet/tools
displayName: 'Add ~/.dotnet/tools to the PATH environment variable'
condition: eq(variables['System.JobName'], 'macos')
- task: InstallAppleCertificate@2
displayName: Install the iOS certificate
condition: eq(variables['System.JobName'], 'macos')
inputs:
certSecureFile: 'Components iOS Certificate.p12'
- task: InstallAppleProvisioningProfile@1
displayName: Install the iOS provisioning profile
condition: eq(variables['System.JobName'], 'macos')
inputs:
provProfileSecureFile: 'Components iOS Provisioning.mobileprovision'
- task: InstallAppleCertificate@2
displayName: Install the macOS certificate
condition: eq(variables['System.JobName'], 'macos')
inputs:
certSecureFile: 'Components Mac Certificate.p12'
- task: InstallAppleProvisioningProfile@1
displayName: Install the macOS provisioning profile
condition: eq(variables['System.JobName'], 'macos')
inputs:
provProfileSecureFile: 'Components Mac Provisioning.provisionprofile'
- task: InstallAppleProvisioningProfile@1
displayName: Install the tvOS provisioning profile
condition: eq(variables['System.JobName'], 'macos')
inputs:
provProfileSecureFile: 'Components tvOS Provisioning.mobileprovision'
- task: UseDotNet@2
displayName: 'Use the correct version of the .NET Core SDK'
inputs:
version: $(DOTNET_CORE_VERSION)
- powershell: |
dotnet tool install -g cake.tool --version $(CAKE_VERSION)
dotnet tool install -g api-tools --version $(API_TOOLS_VERSION)
displayName: 'Install .NET Core tools'
- powershell: dotnet cake --verbosity=$(VERBOSITY)
displayName: 'Run build'
env:
JavaSdkDirectory: $(JAVA_HOME)
- task: PublishBuildArtifacts@1
displayName: 'Publish artifacts'
inputs:
PathToPublish: output
ArtifactName: nuget-$(System.JobName)