-
Notifications
You must be signed in to change notification settings - Fork 4
/
azure-pipelines-android.yaml
86 lines (76 loc) · 2.38 KB
/
azure-pipelines-android.yaml
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
pool:
name: Azure Pipelines
vmImage: 'windows-2022'
demands:
- npm
- msbuild
- MSBuild
- Xamarin.Android
- JDK
variables:
branchName: $[ replace(variables['Build.SourceBranch'], 'refs/heads/', '') ]
steps:
- task: DeleteFiles@1
displayName: 'Delete files from '
inputs:
Contents: |
**/bin
**/obj
- task: NuGetToolInstaller@0
displayName: 'Use NuGet 5.8.0'
inputs:
versionSpec: 5.8.0
- task: NuGetCommand@2
displayName: 'NuGet restore'
inputs:
restoreSolution: '*.sln'
feedsToUse: config
nugetConfigPath: nuget.config
restoreDirectory: packages
- task: XamarinAndroid@1
displayName: 'Build aab (Android App Bundle)'
inputs:
projectFile: '*droid*/*Droid*.csproj'
outputDirectory: '$(Build.BinariesDirectory)/bin/Release'
configuration: Release
msbuildVersionOption: latest
msbuildArchitectureOption: x64
msbuildArguments: '/p:SolutionDir="$(Build.SourcesDirectory)" -p:AndroidPackageFormat=aab -t:SignAndroidPackage -p:AndroidKeyStore=True -p:AndroidNdkDirectory="$(ANDROID_NDK_LATEST_HOME)"'
- task: XamarinAndroid@1
displayName: 'Build APK'
inputs:
projectFile: '*droid*/*Droid*.csproj'
outputDirectory: '$(Build.BinariesDirectory)/bin/Release'
configuration: Release
msbuildVersionOption: latest
msbuildArchitectureOption: x64
msbuildArguments: '/p:SolutionDir="$(Build.SourcesDirectory)" -p:AndroidNdkDirectory="$(ANDROID_NDK_LATEST_HOME)"'
- task: CopyFiles@1
displayName: 'Copy Files to: $(build.artifactstagingdirectory)'
inputs:
SourceFolder: '$(Build.BinariesDirectory)/bin/Release'
Contents: |
*.apk
*aab
TargetFolder: '$(build.artifactstagingdirectory)'
CleanTargetFolder: true
flattenFolders: true
- task: CopyFiles@2
displayName: 'Copy Files Release notes'
inputs:
SourceFolder: 'release-notes'
Contents: |
$(ReleaseNotesName)
test.md
generic.md
TargetFolder: '$(build.artifactstagingdirectory)'
flattenFolders: true
- task: NodeTool@0
displayName: 'Use Node 10.x to run appcenter cmd'
inputs:
versionSpec: 10.x
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: drop'
inputs:
PathtoPublish: '$(build.artifactstagingdirectory)'
ArtifactName: BMM.Droid