GitHub CI/CD Setup
This project uses GitHub Actions for continuous integration and deployment. We have three main workflows:
Build Workflow
The build workflow runs on every pull request and when libraries are updated. It performs the following tasks:
- Validates Gradle wrapper
- Sets up JDK 21
- Runs code style checks using Spotless
- Builds the project
Note
The build workflow runs automatically and requires no additional setup.
Documentation Workflow
The documentation workflow runs whenever changes are pushed to the main branch. It:
- Sets up Python and required dependencies
- Generates API documentation using Dokka
- Deploys documentation to GitHub Pages
Note
The documentation workflow runs automatically and requires no additional setup. Make sure your repository has GitHub Pages enabled in the settings.
Release Workflow
The release workflow is triggered when you push a tag with the format v*.*.*
(e.g., v1.0.0). It:
- Builds a signed release APK
- Creates a GitHub release with the APK
- Deploys to Google Play Store using Fastlane
Prerequisites
Before you can use the release workflow, you need to set up the following GitHub secrets:
-
GOOGLE_SERVICES
: Base64 encoded content of yourgoogle-services.json
file -
KEYSTORE
: Base64 encoded content of your keystore file -
KEYSTORE_PROPERTIES
: Base64 encoded content of your keystore.properties file containing: -
PLAY_STORE_JSON
: Base64 encoded content of yourplay-store.json
file
Warning
Never commit your keystore file, keystore properties, google-services.json or play-store.json directly to the repository.
Creating a Release
To create a new release:
- Update the
CHANGELOG.md
file with your release notes - Create and push a new tag:
The workflow will automatically:
- Generate a signed APK
- Create a GitHub release with the changelog
- Upload the APK to the release
- Deploy to Play Store via Fastlane
Tip
Make sure your Fastlane setup is complete before using the release workflow. See the Fastlane Setup guide for details.
Debugging Failed Releases
If the release workflow fails, check:
- GitHub Secrets are properly set
- Tag format follows
v*.*.*
pattern CHANGELOG.md
exists and is properly formatted- Fastlane configuration is correct
- Keystore and signing configuration match Play Store requirements
Note
The workflow timeout is set to 45 minutes. For large projects, you might need to adjust this in the workflow file.
Further Reading
- Publishing to Play Store: Learn how to publish your app to the Google Play Store