A Simple Continuous Deployment of a React Native App to Google Play

Paulo Carvalho
3 min readJun 16, 2020

We will create a simple Github Action to build and deploy a React Native mobile application automatically upon pushing to a specific branch.

Photo by Kelvin Ang on Unsplash

Pre-Requisites

  1. A react-native application that builds successfully.
  2. An active Google Play account with the desired app already deployed (Google does not allow the first deploy to be programatic).
  3. A JSON key file for a service account user with access to the Google Play APIs. See how to create one here. Renamed to api.json and placed inside the android directory.
  4. A valid App upload key. See how to create one here.

Prepare for Secret Injection

To ensure authenticity, an uploaded application needs to be signed via an upload certificate that is password protected. In order to securely provide this password to our application at compile time we need to define it in our build configuration.

Edit the release certificate configuration in android/app/build.gradle by adding the following code block inside signingConfigs:

release {
storeFile file('upload-key.keystore')
storePassword MYAPP_UPLOAD_STORE_PASSWORD
keyAlias 'bigdelivery-sales-app-upload-key'
keyPassword…

--

--

Paulo Carvalho

Want to chat about startups, consulting or engineering? Just send me an email on paulo@avantsoft.com.br.