Automating Publishing Android App on firebase and Play store

Fastlane

  • You can check Fastlane here.
  • Fastlane provides code signing, releasing an app to play store, push an app to firebase app distribution or you can also generate screenshots by commands only.

GitHub Actions

  • You can check Github Action here.
  • Github action is the same as Fastlane helps you to push the app on the play store directly and also on firebase distribution.

Step 1

  • Go to Google Play Console
  • Go to Settings -> Developer Account > Api Access and Create a service account
  • Open google console and create a service account for CI
  • Add Permission Service Account User as per the below images.
  • Create a private key for this service account and save this as JSON. and save this for later use, we need this at the time of CI setup.
  • After the success of this key generation (save as play_config.json), come back to the play console and click done, you will see one service account with the same name which you have given in the above step.
  • Grant Access to that service account and check all section of releases and add your application which you want to use for this CI/CD.

Github Actions

  • Keystore file (JKS)
  • Key alias
  • Key password
  • Store Password
  • Firebase App Id (For firebase distribution)
  • Firebase token (CLI token)
./gradlew :app:bundleRelease

Fastlane

brew install fastlane
fastlane init
  1. Appfile - Application configuration like package name and all.
  2. Fastfile - It will contain lanes that will be used to push the app.
Appfile Information
Fastfile Information

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Harsh Mittal

Harsh Mittal

Android Developer, Freelance, Enthusiastic Learner