I'd like to upload may android apps (.aab files) automatically to google play console (creating a new internal test) using a bash script (part of my CI/CD pipeline).
On a high level it looks like I have to
- create a sevice project on google cloud
- link that project to google play console
However, I'm stuck at step 2. All the documentation I found on this seems to be outdated.
For example according to this page, under the "Service account overview" section, I should be able to see the newly created service account:
However, when I click on "API Access" under Google Play Console it's pretty much empty:
This sounds like a well documented task but it isn't. Any hints or up-to-date step by step guide for doing this?
Here is a rough solution of how I fixed my problem:
create a sevice project on google cloud (follow this tutorial)
link that project to google play console
In Google Play Console → user management and permissions → add new google cloud service account
Install Fastlane (I'm on Windows and installed Ruby via "rubyinstaller-devkit-3.2.2-1-x64.exe")
Install fastlane via ruby
gem install fastlane -NV
fastlane init
fastlane supply init
(This last command should download metadata of your app if I remember correctly !?)
Download google cloud json authentication key (explained in the video above, min 2:50):
my-authentication-key.json
gcloud auth activate-service-account --key-file=my-authentication-key.json
Run fastlane authentication command
fastlane run validate_play_store_json_key my-authentication-key.json --verbose
Create a Fastfile
mkdir fastlane
touch fastlane/Fastfile
Paste the following content into the file:
fastlane android deploy_to_play_store aab:MyAndroidApp.aab metadata_path:metadata