This document explains how to set up the GitHub Actions workflow for automated Android releases.
You need to add the following secrets to your GitHub repository:
Your release keystore file encoded in base64.
To generate this:
# Navigate to your keystore directory
cd keystore
# Encode your keystore file to base64
base64 -i alternate-release-key.jks | tr -d '\n' > keystore_base64.txtCopy the contents of keystore_base64.txt and add it as KEYSTORE_BASE64 secret in GitHub.
The password for your keystore file.
The alias of your signing key within the keystore.
The password for your signing key.
- Go to your GitHub repository
- Click on Settings tab
- In the left sidebar, click Secrets and variables → Actions
- Click New repository secret
- Add each secret with the exact names mentioned above
The workflow is triggered when you push a tag that starts with 'v':
# Create and push a tag
git tag v1.1.0
git push origin v1.1.0- Setup Environment: Installs Node.js and Java
- Install Dependencies: Runs
npm cito install project dependencies - Build APKs: Uses Gradle to build release APKs for all architectures
- Sign APKs: Signs the APKs with your release keystore
- Create Release: Creates a GitHub release with the tag
- Upload APKs: Uploads all split APKs to the release
The workflow creates the following APK files:
alternate-arm64-v8a-[tag].apk- For modern 64-bit ARM devicesalternate-armeabi-v7a-[tag].apk- For older 32-bit ARM devicesalternate-x86_64-[tag].apk- For 64-bit x86 devicesalternate-x86-[tag].apk- For 32-bit x86 devicesoutput-metadata.json- Build metadata
- Keystore decoding fails: Make sure your base64 encoding doesn't contain newlines
- Signing fails: Verify your keystore password, key alias, and key password are correct
- Build fails: Check that your dependencies are properly defined in package.json
Before pushing a tag, you can test the build process locally:
# Install dependencies
npm ci
# Prebuild
npx expo prebuild --platform android --clean
# Build (replace with your actual keystore details)
cd android
./gradlew assembleRelease \
-Pandroid.injected.signing.store.file=../keystore/alternate-release-key.jks \
-Pandroid.injected.signing.store.password=YOUR_KEYSTORE_PASSWORD \
-Pandroid.injected.signing.key.alias=YOUR_KEY_ALIAS \
-Pandroid.injected.signing.key.password=YOUR_KEY_PASSWORDAfter a successful build, APKs will be located at:
android/app/build/outputs/apk/release/app-arm64-v8a-release.apkandroid/app/build/outputs/apk/release/app-armeabi-v7a-release.apkandroid/app/build/outputs/apk/release/app-x86_64-release.apkandroid/app/build/outputs/apk/release/app-x86-release.apk