GitHub Actions is honestly amazing — you can automate your entire build process just by pushing code to GitHub! Recently, I’ve been experimenting with it and absolutely love how powerful and flexible it is. I’ve used GitHub Actions before to build Python packages and Electron apps, and then I thought — why not try it for Android too?
Before getting started
Make sure you’ve completed the following setup steps:
-
Encode your KeyStore file (
.jks
) to Base64:
openssl base64 -A -in keystore.jks -out base64.txt
Copy the contents of
base64.txt
and add it as a GitHub secret namedSIGNINGKEYBASE64
.Add the following secrets as well:
-
ALIAS
→ your key alias -
KEYSTOREPASSWORD
→ your keystore password -
KEYPASSWORD
→ your key password
Setting Up the Workflow File
Now, in your project root, create the following folder structure:
.github/
└── workflows/
└── build.yml
Inside the workflows folder, create a file named build.yml and add the following content to it:
You’re All Set! 🚀
That’s it — you’re now good to go!
Whenever you create a tag (for example, v1.2.3
), make a commit with the same message (v1.2.3
), and push it to GitHub — GitHub Actions will automatically:
- Build the APK and AAB files
- Sign them with your keystore credentials
- Create a release using the tag
- And upload the files as release assets
Version bumping, committing, tagging, and pushing can be done effortlessly using a handy tool called Bumper.
It automates version management, so you can focus on building instead of manually updating version numbers every time.
Example Project
If you’d like to see this entire build process in action, check out my example project:
👉 Spotify Playlist Downloader
Want to use GitHub secrets in your Android Apps? Check out this post.
Top comments (4)
Hi, many thanks!
Regarding 'signingKeyBase64' - is the key and keystore the same thing (format)?
I already have my android keystore into Github secrets and it works nice for signing 3D Unity apps, but when I tried to use it in r0adkll/sign-android-release@v1, I received "Failed to load signer "signer #1"
java.io.EOFException" exception.
Hey @vitalykarasik , I've found out the solution in issues.
Check out this link for the solution.
Hi
I did exactly same but I got this error:
Execution failed for task ':app:validateSigningRelease'.
I know 'my-upload-key.keystore' is not uploaded to my repository, but the questions is why it needs this file while I've already import the key base64 content in the action secret?
Solution:
stackoverflow.com/questions/730242...