CI/CD for Android - Initial Deployment

CI/CD for Android - Initial Deployment

·

3 min read

As mentioned before in the previous lessons, it is a requirement from Google Play to perform the initial deployment of the app manually.

We need to prepare our app on Google Play by creating the app and adding essential application details and resources such as the app name, description, icons, branding, terms and conditions, permissions, data safety, and more.

  1. Open up your Google Play Console, and click on the Create app button.

    Screenshot 2023-08-02 at 09.39.51.png

  2. Fill out the form about the application details, and create the app.

  3. Follow the instructions on Google Play to fill out all the requirements about your new app, such as Store Listing, Data Safety, Permissions, and so on.

  4. Make sure to add a link to the terms and conditions page in your Store Listing. If you still don't have the terms and conditions page, there are a lot of online generators that will ask for a few things about your app and generate and host terms and conditions for you for free. That's a good temporal solution at least.

  5. Generate a signed app version (bundle) on your local environment, using the Keystore and the key you used to set up the GitHub secrets.

    • In Android Studio go to Build -> Generate Signed Bundle / APK...

      Screenshot 2023-08-02 at 09.47.07.png

    • In the dialog that appears make sure Android App Bundle is selected. That's the recommended way to ship Android apps for the last few years.

      Screenshot 2023-07-31 at 00.25.05.png

      Click Next

    • In the dialog that shows now, fill out the form if it's not already pre-filled

      Screenshot 2023-07-31 at 11.10.25.png

      Make sure the correct Keystore file is selected, the correct password for the Keystore, and the correct key alias-password combination is used. Click on Next

    • In the dialog that appears next, select the variant you are going to be creating. In my case, I will be creating a release

      Screenshot 2023-08-02 at 09.57.13.png

      Optionally, you can change the destination of the generated file if you wish so. Click Create.

      That will generate a new bundle that we can drag and drop inside the Google Play Console.

  6. Go back to the Google Play Console, and do the initial app upload manually, using the signed bundle we just generated.

Once we have the initial deployment done, we can start using our CI/CD system for future deployments. All we need to do is just integrate the new code into the branch we have set up in the deployment script, and then the job will run and make a new deployment to Google Play.

It saves an incredible amount of time and sets us free from the boring tasks of building, singing, and deploying the app manually. On top of that, it's way more secure to not hold the secrets in the repository, or on your local machine.

Did you find this article valuable?

Support Jov's Blog by becoming a sponsor. Any amount is appreciated!