forked from brminnick/AsyncAwaitBestPractices
-
Notifications
You must be signed in to change notification settings - Fork 1
/
azure-pipelines.yml
70 lines (59 loc) · 2.25 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
pool:
name: Azure Pipelines
demands:
- msbuild
- MSBuild
- Xamarin.Android
#Your build pipeline references a secret variable named ‘AppCenterApiToken’. Create or edit the build pipeline for this YAML file, define the variable on the Variables tab, and then select the option to make it secret. See https://go.microsoft.com/fwlink/?linkid=865972
#Your build pipeline references the ‘BuildConfiguration’ variable, which you’ve selected to be settable at queue time. Create or edit the build pipeline for this YAML file, define the variable on the Variables tab, and then select the option to make it settable at queue time. See https://go.microsoft.com/fwlink/?linkid=865971
steps:
- task: UseDotNet@2
displayName: 'Use .Net Core sdk 3.x'
inputs:
version: ' 3.x'
includePreviewVersions: true
installationPath: '$(Agent.ToolsDirectory)'
performMultiLevelLookup: true
- task: NuGetToolInstaller@1
displayName: 'Use NuGet'
inputs:
checkLatest: true
- task: NuGetCommand@2
displayName: 'Restore NuGet Packages'
inputs:
restoreSolution: Src/AsyncAwaitBestPractices.sln
- task: DotNetCoreCLI@2
displayName: 'Run Unit Tests'
inputs:
command: test
projects: '$(Build.SourcesDirectory)/Src/AsyncAwaitBestPractices.UnitTests'
- task: MSBuild@1
displayName: 'Build Sln'
inputs:
solution: Src/AsyncAwaitBestPractices.sln
- task: XamarinAndroid@1
displayName: 'Build Xamarin.Android project '
inputs:
projectFile: '**/*Droid.csproj'
configuration: debug
msbuildVersionOption: latest
- task: Bash@3
displayName: 'Submit APK to App Center Test'
inputs:
targetType: filePath
filePath: './$(Build.SourcesDirectory)/Src/SubmitApkToAppCenterTest.sh'
arguments: '$(AppCenterApiToken)'
failOnStderr: true
env:
BuildPath: $(Build.Repository.LocalPath)
NuGetPackagesPath: $(UserProfile)\.nuget\packages
- task: CopyFiles@2
displayName: 'Copy Files to: $(build.artifactstagingdirectory)'
inputs:
SourceFolder: '$(system.defaultworkingdirectory)'
Contents: '**\bin\$(BuildConfiguration)\**'
TargetFolder: '$(build.artifactstagingdirectory)'
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: drop'
inputs:
PathtoPublish: '$(build.artifactstagingdirectory)'