I wanted that every time that I commit a change in my Android repo a new APK is automatically generated and stored. Although I use Jenkins as my Continuous Integration server at work, I use Travis CI for this project. Travis CI launched Android Builds Support in Beta and I wanted to give them a chance :P
Building the project
Travis CI automatically detects when a commit has been made and pushed to a GitHub repository that is using Travis CI, and each time this happens, it will try to build the project and run tests. Following the instructions that Travis CI provides is very easy to setup your project and compile your code: Building an Android Project with Travis
Uploading the APK in GitHub Releases
Travis can upload the artifacts of your build in AWS S3. But I want to have the APK in the same place where a I have my code (I save a little of money too :P)
So I setup my yaml file to upload the APK to GitHub Releases every time that a new tag in Github is created. If you use Git Flow, it will create a tag automatically for each release. So you will have your APK ready to be published in Google Play.
Notice that I use ./gradlew build assembleRelease to avoid launching the Android emulator. The deploy section has the configuration to upload the apk only when a tag is created.