π¦ Publishing APKs to GitHub for Public Download
Overview
This guide explains how to publish APK files to GitHub Releases so anyone can download and install the Airo Super App on their Android devices.
π― Quick Start (TL;DR)
# 1. Commit your changes
git add .
git commit -m "Release v1.0.0"
git push
# 2. Create and push a tag
git tag -a v1.0.0 -m "Release v1.0.0 - Initial public release"
git push origin v1.0.0
# 3. Wait ~15 minutes for GitHub Actions to build
# 4. APK will be available at: https://github.com/DevelopersCoffee/airo/releases/tag/v1.0.0
π Prerequisites
1. GitHub Secrets Setup
You need to configure one secret in your GitHub repository:
Go to: Settings β Secrets and variables β Actions β New repository secret
Required Secret:
- Name:
GOOGLE_SERVICES_JSON - Value: Base64-encoded content of
app/android/app/google-services.json
How to create the secret:
# On Linux/Mac:
base64 -w 0 app/android/app/google-services.json
# On Windows (PowerShell):
[Convert]::ToBase64String([IO.File]::ReadAllBytes("app\android\app\google-services.json"))
Copy the output and paste it as the secret value.
2. Verify Workflow Files
Ensure these files exist (they already do):
- β
.github/workflows/build-and-release.yml- Builds and publishes releases - β
.github/workflows/ci.yml- Runs tests on every push
π Publishing a Release
Step 1: Prepare Your Code
# Make sure all changes are committed
git status
# If you have uncommitted changes:
git add .
git commit -m "Prepare for release v1.0.0"
git push
Step 2: Create a Git Tag
# Create an annotated tag (recommended)
git tag -a v1.0.0 -m "Release v1.0.0 - Initial public release"
# Or create a lightweight tag
git tag v1.0.0
# Push the tag to GitHub
git push origin v1.0.0
Tag Naming Convention:
v1.0.0- Major release (breaking changes)v1.1.0- Minor release (new features)v1.0.1- Patch release (bug fixes)v1.0.0-beta.1- Pre-release (beta testing)v1.0.0-alpha.1- Pre-release (alpha testing)
Step 3: Monitor the Build
- Go to:
https://github.com/DevelopersCoffee/airo/actions - Youβll see a workflow running: βBuild and Releaseβ
- Click on it to see progress
- Wait ~15-20 minutes for all platforms to build
Whatβs being built:
- β Android APK (release)
- β Android AAB (Google Play)
- β iOS IPA (unsigned)
- β Web (ZIP)
- β Windows (ZIP)
- β Linux (TAR.GZ)
Step 4: Verify the Release
- Go to:
https://github.com/DevelopersCoffee/airo/releases - You should see your new release (e.g.,
v1.0.0) - Click on it to see all downloadable files
Files available for download:
app-release.apk- Android APK (~50 MB)app-release.aab- Android App Bundle for Play Store (~40 MB)app-release.ipa- iOS IPA (~100 MB)airo-web-release.zip- Web build (~30 MB)airo-windows-release.zip- Windows build (~80 MB)airo-linux-release.tar.gz- Linux build (~60 MB)RELEASE_NOTES.md- Auto-generated release notes
π± How Users Download and Install
For Android Users
Step 1: Download APK
- Go to:
https://github.com/DevelopersCoffee/airo/releases/latest - Click on
app-release.apkto download
Step 2: Enable Unknown Sources
- Open Settings on Android device
- Go to Security or Privacy
- Enable Install unknown apps for your browser (Chrome, Firefox, etc.)
Step 3: Install APK
- Open the downloaded
app-release.apkfile - Tap Install
- Wait for installation to complete
- Tap Open to launch the app
Alternative: Using ADB
# Download APK from GitHub
wget https://github.com/DevelopersCoffee/airo/releases/download/v1.0.0/app-release.apk
# Install via ADB
adb install app-release.apk
π§ Advanced: Customizing Releases
Adding Release Notes
Create a file RELEASE_NOTES.md in your repository root before tagging:
# Release v1.0.0 - Initial Public Release
## π New Features
- β
AI-powered chat assistant with Gemini Nano
- β
6 sample prompts for quick actions
- β
Chess game with Stockfish AI
- β
Music player with playlist support
- β
Multi-platform support (Android, iOS, Web)
## π Bug Fixes
- Fixed AI streaming threading issue
- Improved audio playback stability
## π± Installation
Download `app-release.apk` and install on your Android device.
## π Security
- No hardcoded secrets
- SQLCipher encryption ready
- Secure local storage
## π Performance
- Cold start: <3s
- Memory: ~250MB
- Battery: <5% per hour
Building Locally Before Release
# Build release APK locally
cd app
flutter build apk --release
# Test the APK
adb install build/app/outputs/flutter-apk/app-release.apk
# If everything works, create the tag
git tag -a v1.0.0 -m "Release v1.0.0"
git push origin v1.0.0
Creating Pre-releases
# Create a beta release
git tag -a v1.0.0-beta.1 -m "Beta release for testing"
git push origin v1.0.0-beta.1
In the GitHub Release, check the βThis is a pre-releaseβ checkbox.
π Release Checklist
Before creating a release, ensure:
- All tests pass (
make test) - Code is formatted (
make format) - No linting errors (
make lint) - Version updated in
app/pubspec.yaml - CHANGELOG.md updated
- RELEASE_NOTES.md created
- All changes committed and pushed
- GitHub secret
GOOGLE_SERVICES_JSONis set - Build tested locally
π Making Releases Discoverable
1. Add Download Badge to README
[](https://github.com/DevelopersCoffee/airo/releases/latest/download/app-release.apk)
2. Create a Releases Page
Add to your README.md:
## π₯ Download
### Android
[Download Latest APK](https://github.com/DevelopersCoffee/airo/releases/latest/download/app-release.apk)
### iOS
[Download Latest IPA](https://github.com/DevelopersCoffee/airo/releases/latest/download/app-release.ipa)
### Web
[Download Web Build](https://github.com/DevelopersCoffee/airo/releases/latest/download/airo-web-release.zip)
### All Releases
[View All Releases](https://github.com/DevelopersCoffee/airo/releases)
3. Pin Latest Release
GitHub automatically shows the latest release on your repository homepage.
π Automated Release Workflow
The workflow (.github/workflows/build-and-release.yml) automatically:
- β
Triggers when you push a tag (e.g.,
v1.0.0) - β Builds all platforms in parallel
- β Signs Android APK/AAB (if keystore configured)
- β Creates GitHub Release
- β Uploads all build artifacts
- β Generates release notes from commits
- β Publishes release (public download)
Build Time: ~15-20 minutes (parallel builds)
π Signing APKs (Optional but Recommended)
For production releases, you should sign your APK with a keystore.
Generate Keystore
keytool -genkey -v -keystore airo-release-key.jks \
-keyalg RSA -keysize 2048 -validity 10000 \
-alias airo-key
Add to GitHub Secrets
- KEYSTORE_FILE: Base64-encoded keystore file
- KEYSTORE_PASSWORD: Keystore password
- KEY_ALIAS: Key alias (e.g.,
airo-key) - KEY_PASSWORD: Key password
Update Workflow
The workflow already supports signing if secrets are configured.
π Monitoring Downloads
View Download Stats
- Go to:
https://github.com/DevelopersCoffee/airo/releases - Each release shows download count for each asset
- Click on a release to see detailed stats
Using GitHub API
# Get latest release info
curl https://api.github.com/repos/DevelopersCoffee/airo/releases/latest
# Get all releases
curl https://api.github.com/repos/DevelopersCoffee/airo/releases
π¨ Troubleshooting
Build Fails
Check:
- GitHub Actions logs:
Actionstab β Click on failed workflow - Ensure
GOOGLE_SERVICES_JSONsecret is set correctly - Verify
pubspec.yamldependencies are valid - Check Flutter version in workflow matches your local version
APK Wonβt Install
Solutions:
- Enable βInstall unknown appsβ in Android settings
- Download APK again (may be corrupted)
- Check Android version compatibility (min SDK 24)
- Try installing via ADB
Release Not Created
Check:
- Tag was pushed to GitHub:
git push origin v1.0.0 - Workflow completed successfully
- No errors in GitHub Actions logs
π Additional Resources
- GitHub Releases Docs: https://docs.github.com/en/repositories/releasing-projects-on-github
- Flutter Build Docs: https://docs.flutter.dev/deployment/android
- Semantic Versioning: https://semver.org/
π Example: First Release
# 1. Update version in pubspec.yaml
# version: 1.0.0+1
# 2. Create release notes
cat > RELEASE_NOTES.md << 'EOF'
# Airo Super App v1.0.0 - Initial Release
First public release of Airo Super App!
## Features
- AI Chat Assistant
- Chess Game
- Music Player
- Multi-platform support
Download the APK and enjoy!
EOF
# 3. Commit and push
git add .
git commit -m "Release v1.0.0"
git push
# 4. Create and push tag
git tag -a v1.0.0 -m "Release v1.0.0 - Initial public release"
git push origin v1.0.0
# 5. Wait for build (~15 min)
# 6. Share the link: https://github.com/DevelopersCoffee/airo/releases/tag/v1.0.0
β Summary
To publish an APK for public download:
- Set up
GOOGLE_SERVICES_JSONsecret (one-time) - Create and push a git tag (e.g.,
v1.0.0) - Wait for GitHub Actions to build (~15 min)
- Share the release URL with users
Users can download from:
- Latest release:
https://github.com/DevelopersCoffee/airo/releases/latest - Direct APK link:
https://github.com/DevelopersCoffee/airo/releases/latest/download/app-release.apk
Thatβs it! π