Azure开发人员管道以App Bundle的形式构建和部署本机Android应用程序Google Play商店或App Center

问题描述

我需要设置Azure devops管道,以将本机Android应用程序作为App Bundle构建和部署到Google Play商店或App Center。

我可以弄清楚要部署apk,但需要帮助来部署应用程序捆绑包(.aab)。任何帮助将不胜感激。

解决方法

您可以使用Google Play-Release Bundle任务来部署应用程序捆绑包(.aab)。在您的azure devops组织中安装Google play extension之后。您可以在管道中添加Google Play-Release Bundle任务,并将.rst字段配置为生成的.aab bundleFile的位置。见下文。

bundleFile

查看以下教程,为您的Android应用程序创建管道

Build,test,and deploy Android apps

更新:

您可以在天青管道中使用- task: ms-vsclient.google-play.google-play-release-bundle.GooglePlayReleaseBundle@3 displayName: 'Release functionParam.ps1 to internal' inputs: serviceConnection: googleServiceEndPoint applicationId: applicationId bundleFile: **/*.aab 命令对aab捆绑包进行签名。如果将密钥库文件上传到download secure file task,则可能需要使用secure file来使用它的密钥库文件。例如,在powershell任务中在jarsigner命令下运行:

jarsigner

有关更多信息,请参见this thread

您还可以使用Xamarin.Android构建任务。并在“其他自变量”中传递以下论点以进行构建,以打包并签署App Bundle:

jarsigner -verbose -sigalg SHA256withRSA -digestalg SHA-256 -keystore my_keystor_file.keystore -storepass 'super_secret_keystore_pass' -keypass 'super_secret_alias_password' my-app-bundle.aab myKeyStoreAlias

有关更多信息,请参见here