-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
79 lines (66 loc) · 2.17 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
# 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:
- release
pool:
vmImage: 'macos-latest'
variables:
buildConfiguration: 'Release'
outputDirectory: '$(build.binariesDirectory)/$(buildConfiguration)'
steps:
- task: DownloadSecureFile@1
name: IdentityServiceSecret
inputs:
secureFile: 'IdentityServiceSecret'
- task: Bash@3
inputs:
targetType: 'inline'
script: |
# Write your commands here
echo 'Renaming secret'
mv $(IdentityServiceSecret.secureFilePath) NutzMich.Shared/Services/IdentityServiceSecret.cs
- task: NuGetToolInstaller@1
- task: NuGetCommand@2
inputs:
command: 'restore'
restoreSolution: '**/*Droid.csproj'
feedsToUse: 'select'
- task: android-manifest-package-name@1
inputs:
sourcePath: 'NutzMich.Droid/Properties/AndroidManifest.xml'
packageName: 'de.nutzmich.app'
appLabel: 'NutzMich'
printFile: true
- task: android-manifest-version@1
inputs:
sourcePath: 'NutzMich.Droid/Properties/AndroidManifest.xml'
versionCodeOption: 'buildid'
versionCode: '$(Build.BuildId)'
printFile: true
- task: XamarinAndroid@1
inputs:
projectFile: '**/*Droid.csproj'
outputDirectory: '$(outputDirectory)'
configuration: '$(buildConfiguration)'
- task: AndroidSigning@3
displayName: 'Signing and aligning APK file(s) **/*.apk'
inputs:
apksignerKeystoreFile: NutzMich.keystore
apksignerKeystorePassword: '$(keystore.password)'
apksignerKeystoreAlias: '$(keystore.alias)'
apksignerKeyPassword: '$(keystore.keypassword)'
apksignerArguments: --out $(outputDirectory)/de.nutzmich.release.apk
- task: CopyFiles@2
displayName: 'Copy Files to: $(Build.ArtifactStagingDirectory)'
inputs:
SourceFolder: '$(outputDirectory)'
Contents: '*de.nutzmich.release.apk'
TargetFolder: '$(Build.ArtifactStagingDirectory)'
condition: succeededOrFailed()
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
ArtifactName: 'android_storeupload_drop'
publishLocation: 'Container'