-
Notifications
You must be signed in to change notification settings - Fork 2
/
azure-pipelines-sample.yml
82 lines (69 loc) · 2.32 KB
/
azure-pipelines-sample.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
# Xamarin.Android
# Build a Xamarin.Android project.
# Add steps that test, sign, and distribute an app, save build artifacts, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/xamarin
trigger:
- master
pool:
vmImage: 'macos-latest'
variables:
buildConfiguration: 'Release'
outputDirectory: '$(build.binariesDirectory)/$(buildConfiguration)'
steps:
- task: NuGetToolInstaller@1
- task: NuGetCommand@2
inputs:
restoreSolution: '**/*.sln'
- task: android-manifest-version@1
inputs:
sourcePath: '$(Build.SourcesDirectory)/CauserException/CauserException.Android/Properties/AndroidManifest.xml'
versionCodeOption: 'buildid'
versionCode: '$(Build.BuildId)'
printFile: true
- task: XamarinAndroid@1
inputs:
projectFile: '**/*CauserException.Android*.csproj'
outputDirectory: '$(outputDirectory)'
configuration: '$(buildConfiguration)'
- task: DownloadSecureFile@1
inputs:
secureFile: 'com.sample.causerexception.keystore'
- task: AndroidSigning@3
inputs:
apkFiles: '**/*.apk'
apksign: true
apksignerKeystoreFile: 'com.sample.causerexception.keystore'
apksignerKeystorePassword: '123456'
apksignerKeystoreAlias: 'com.sample.causerexception'
apksignerArguments: --out $(outputDirectory)/com.sample.causerexception.apk
apksignerKeyPassword: '123456'
zipalign: true
# Copy Keystore
- task: CopyFiles@2
displayName: 'Copy Keystore to: $(Build.ArtifactStagingDirectory)'
inputs:
SourceFolder: '$(Build.SourcesDirectory)/Scripts/KeyStore/'
Contents: 'com.sample.causerexception.keystore'
TargetFolder: '$(build.artifactstagingdirectory)'
OverWrite: true
#Copy Scripts
- task: CopyFiles@2
displayName: 'Copy Scripts to: $(Build.ArtifactStagingDirectory)'
inputs:
SourceFolder: '$(Build.SourcesDirectory)/Scripts/'
Contents: 'Change_Config_APK.sh'
TargetFolder: '$(build.artifactstagingdirectory)/Scripts'
OverWrite: true
# Copy APK
- task: CopyFiles@2
displayName: 'Copy APK to: $(Build.ArtifactStagingDirectory)'
inputs:
SourceFolder: '$(outputDirectory)'
Contents: '**/*.apk'
TargetFolder: '$(build.artifactstagingdirectory)/Release/'
OverWrite: true
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
ArtifactName: 'drop'
publishLocation: 'Container'