Last active
September 1, 2021 16:16
-
-
Save James-Aidoo/a8c2719d2924fc92b3f00e1f60b2e678 to your computer and use it in GitHub Desktop.
Sample Azure pipeline for building and distributing multiple generated APKs to Visual Center AppCenter for release. App center distribute template here: https://gist.github.com/James-Aidoo/0f7eb562ec69da6e1fe3a01152db7acd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Variable 'Key.StorePassword' was defined in the Variables tab | |
# Variable 'Key.Alias' was defined in the Variables tab | |
# Variable 'Key.Password' was defined in the Variables tab | |
# Variable 'Key.StoreFileName' was defined in the Variables tab | |
variables: | |
- name: BuildParameters.wrapperScript | |
value: gradlew | |
- name: BuildParameters.tasks | |
value: assembleRelease | |
trigger: | |
branches: | |
include: | |
- develop | |
name: $(date:yyyyMMdd)$(rev:.r) | |
resources: | |
repositories: | |
- repository: self | |
type: git | |
ref: develop | |
jobs: | |
- job: Job_1 | |
displayName: Agent job 1 | |
pool: | |
vmImage: ubuntu-20.04 | |
steps: | |
- checkout: self | |
clean: true | |
- task: Gradle@2 | |
displayName: gradlew assembleRelease | |
inputs: | |
wrapperScript: $(BuildParameters.wrapperScript) | |
tasks: $(BuildParameters.tasks) | |
- task: AndroidSigning@3 | |
displayName: Signing and aligning APK file(s) **/*.apk | |
inputs: | |
keystoreFile: $(Key.StoreFileName) #Keystore file name as added to your secure files | |
keystorePass: $(Key.StorePassword) | |
keystoreAlias: $(Key.Alias) | |
keyPass: $(Key.Password) | |
zipalign: false | |
- task: CopyFiles@2 | |
displayName: 'Copy Files to: $(build.artifactstagingdirectory)' | |
inputs: | |
SourceFolder: $(system.defaultworkingdirectory) | |
Contents: '**/*.apk' | |
TargetFolder: $(build.artifactstagingdirectory) | |
CleanTargetFolder: true | |
OverWrite: true | |
flattenFolders: true | |
- task: PublishBuildArtifacts@1 | |
displayName: 'Publish Artifact: drop' | |
inputs: | |
PathtoPublish: $(build.artifactstagingdirectory) | |
- template: app-center-distribute-template.yml | |
parameters: | |
listOfApks: [ | |
"$(build.artifactstagingdirectory)/variant1-unsigned.apk", | |
"$(build.artifactstagingdirectory)/variant2-unsigned.apk" | |
] #list of signed APKs to be distributed | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment