Idea: Play Store API Login
A service account json file is used to authorize API access to an account in the Google Play store. If GitLab supported uploads of these files it would simplify the process of uploading builds to the Play store, and would set us up for further integrations in the future (like test user management, and managing release tracks).
Play Store API reference: https://developers.google.com/android-publisher/api-ref/rest
The first iteration would simply be adding the ability to upload a service account json file, and pass those credentials to the Fastlane upload_to_play_store
action to streamline the release process.
Part 1 - User creates a service account with Google
This is a manual process the user must do, described here https://docs.fastlane.tools/getting-started/android/setup/ (See the Collect your Google credentials
section)
Part 2 - Upload
Create a mechanism for the user to upload the newly created credentials file to GitLab.
The uploaded file should be validated as well. Fastlane has an action for this already: fastlane run validate_play_store_json_key json_key:json_key_file.json
Part 3 - Add credentials to CI builds
Adding the credentials to the build could be done in a couple of ways. The example here writes the file to the location expected by the fastlane/Appfile
https://gitlab.com/gitlab-org/incubation-engineering/devops-for-mobile-apps/readme/-/issues/31#create-a-gcp-service-account-credentials-file
We could also consider a Fastlane action for this. Something like fastlane gitlab load_service_account
The value of this for a user is it would eliminate a lot of the complexity present today when trying to release an android app via GitLab CI (example here: https://gitlab.com/gitlab-org/incubation-engineering/devops-for-mobile-apps/readme/-/issues/31#android-app-release).
Note: A security evaluation of an approach like this would be necessary as well.