This demo app showcases how to set up CI/CD for Android using GitHub Actions and Firebase App Distribution. It includes building variants (debug
, preProd
, release
) and distributing APKs automatically to testers.
Each build variant has its own workflow and can be triggered manually.
- GitHub Actions CI/CD workflow
- Firebase App Distribution integration
- Multiple build variants support
- Upload release notes
- Manual or auto trigger support
- Secure with GCP Service Account via GitHub Secrets
Three workflow files are located in .github/workflows/
:
build-debug.yml
build-preprod.yml
build-release.yml
Each file:
- Builds a specific variant (
assembleDebug
,assemblePreProd
, orassembleRelease
) - Runs on manual trigger using
workflow_dispatch
- Uploads the APK as a downloadable artifact and on firebase app distribution
Firebase Credentials Setup : https://github.com/wzieba/Firebase-Distribution-Github-Action/wiki/FIREBASE_TOKEN-migration
- Open your GitHub repo → Settings → Secrets → Actions
🔐 Secret Name | 💡 Value |
---|---|
CREDENTIAL_FILE_CONTENT |
Paste the full JSON content of the Firebase service account key |
FIREBASE_APP_ID |
Get it from Firebase Console → Project Settings → General → App ID |
TESTERS_EMAILS |
Comma-separated emails, e.g., user1@example.com,user2@example.com |
- Push your code to GitHub.
- Go to your repo's Actions tab.
- Select the workflow (e.g.,
Build Debug APK
). - Click “Run workflow”.
- Choose the branch and click “Run workflow”.
GitHub Actions will then:
- Build your project for the selected variant
- Generate an APK
- Upload it for download
Once the workflow finishes, you can:
- Click the workflow run
- Scroll to the Artifacts section
- Download the generated APK (
.apk
)
- Android project with build variants defined (e.g.,
debug
,preProd
,release
) - GitHub repository with Actions enabled
- Gradle configured to build the required flavors
.github/
└── workflows/
├── build-debug.yml
├── build-preprod.yml
└── build-release.yml



