A centralized repository containing reusable GitHub Actions workflows designed to automate the Android development lifecycle. These pipelines handle tasks such as building APKs, running unit tests, linting code, and creating GitHub releases.
| Workflow Name | File Name | Trigger | Description |
|---|---|---|---|
| Build & Release APK | on_dispatch.yml |
Tag Push (v*) |
Builds a Debug/Release APK, renames it, and uploads it to GitHub Releases automatically. |
To use any of these workflows in your Android project:
- Create a
.github/workflowsdirectory in the root of your project. - Copy the desired
.ymlfile content from this repository. - Paste it into a new file inside your project (e.g.,
.github/workflows/release.yml). - Configure the required Secrets (see below).
Some workflows (like the Release workflow) require secrets to access external services (like APIs) or to sign the app.
Go to Settings > Secrets and variables > Actions in your target repository and add:
| Secret Name | Required For | Description |
|---|---|---|
NEWS_API_KEY |
release.yml |
Your API Key for fetching news (injected into local.properties). |
KEYSTORE_PASSWORD |
release-signed.yml |
(Optional) Password for your signing Keystore (if using signed release). |
KEY_ALIAS |
release-signed.yml |
(Optional) Key alias for signing. |
This is the standard workflow used to generate an APK and attach it to a release tag.
name: Android Build & Release
on:
push:
tags:
- 'v*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
# Create local.properties with API Key
- name: Create local.properties
run: echo "NEWS_API_KEY=${{ secrets.NEWS_API_KEY }}" > local.properties
- name: Build APK
run: ./gradlew assembleDebug
# Upload to Release...