Skip to content

Build & Release

This guide covers building the app for release and creating GitHub Releases via tags.

Build Commands

Debug Build

flutter run

Release APK (local)

flutter build apk --release

The release APK is output to:

build\app\outputs\flutter-apk\app-release.apk

Release App Bundle (Play Store)

flutter build appbundle --release

iOS Build

flutter build ios --release

Clean Build Artifacts

flutter clean
flutter pub get

Signing Setup (Android)

Release APKs and AABs must be signed. Nice TV uses a keystore stored in GitHub Secrets for CI.

Generate a Release Keystore

keytool -genkey -v -keystore upload-keystore.jks -keyalg RSA -keysize 2048 -validity 10000 -alias upload

Encode for GitHub Secrets

# On Linux/macOS/Git Bash
base64 upload-keystore.jks | tr -d '\n' > keystore_base64.txt

# On Windows PowerShell
[Convert]::ToBase64String([IO.File]::ReadAllBytes("upload-keystore.jks")) > keystore_base64.txt

Add Secrets to GitHub

Go to Settings → Secrets and variables → Actions and add:

Secret Description
ANDROID_KEYSTORE_BASE64 Base64-encoded JKS keystore
ANDROID_KEY_ALIAS Key alias (e.g., upload)
ANDROID_KEY_PASSWORD Key password
ANDROID_STORE_PASSWORD Keystore password

Creating a Release

  1. Update the version in pubspec.yaml:
version: 1.3.1+4
  1. Commit the version bump:
git add pubspec.yaml
git commit -m "chore: bump version to 1.3.1"
  1. Create and push a tag:
git tag v1.3.1
git push origin v1.3.1
  1. The GitHub Actions release workflow will automatically:
  2. Build a signed release APK
  3. Upload it as a GitHub Release asset
  4. Upload it as a workflow artifact

Verification Checklist

dart format .
flutter analyze
flutter test

Smoke on device: sign in, Following tab, watch + chat send, notifications inbox after a followed channel goes live, native HLS failure falls back to embed.