Manual publishing is a chore and a waste of time as it involves a lot of steps which are redundant and can be easily automated.
Manual publishing requires these steps
- Create a signed APK for your app.
- Login to the google play developer account.
- Select the app and create a release.
- Upload the APK with changelog.
- Submit the update.
- Repeat the above 5 steps again for a new release.
Doing this again and again can become quite irritating after a while. Also, if you are uploading multiple APKs for every release then manual publishing would only lead to headaches.
So, automating this part can help save you some time which you can use to procrastinate ;)
Prerequisites
- Google play developer account.
- An already listed app in your developer account.
- CI (Continuous Integration) tool of your choice. I will use Travis CI for this tutorial as it is free to use with open source projects.
Signing your APK properly
In order to create a signed build of your app, you can either use AndroidStudio’s inbuilt UI (Build > Generate Signed APK…) or specify your keystore details in your build.gradle
. We will use the latter as it is will help us automate the signing process for our app.
Add this snippet to your build.grade’s android section:
You can now run ./gradlew assembleRelease
command to create a signed APK directly.
In the next part, we will discuss how to set up your google play developer account.
PS: In upcoming parts of this blog series, I will also explain how to secure your keystore details for your open source projects.
References: