This document explains the automated release process for SimpleHIIT.
SimpleHIIT uses GitHub Actions to automatically build, sign, and publish release APKs when version tags are pushed to the repository.
What happens automatically:
- Signed APK builds for both mobile and TV variants
- Changelog generation from git commit history
- GitHub Release creation with downloadable APKs
- Properly named artifacts:
SimpleHIIT-mobile-vX.XX.apkandSimpleHIIT-tv-vX.XX.apk
The following secrets are configured in the repository for APK signing:
SIGNING_KEYSTORE_BASE64- Base64-encoded release keystoreSIGNING_KEYSTORE_PASSWORD- Keystore passwordSIGNING_KEY_ALIAS- Key alias (simplehiit)SIGNING_KEY_PASSWORD- Key password
Release signing is configured in:
build-logic/convention/src/main/kotlin/fr/shiningcat/simplehiit/plugins/AndroidAppHandheldConventionPlugin.ktbuild-logic/convention/src/main/kotlin/fr/shiningcat/simplehiit/plugins/AndroidAppTvConventionPlugin.kt
Signing is only applied when environment variables are present (CI/CD), ensuring local debug builds remain unsigned.
The automated release workflow is defined in:
.github/workflows/release.yml
Trigger: Push of version tags matching pattern v* (e.g., v0.05, v1.23)
Steps:
- Checkout code
- Set up JDK 21
- Decode release keystore from secrets
- Build signed mobile APK
- Build signed TV APK
- Generate changelog from commits
- Create GitHub release with APKs attached
# Ensure you're on master with latest changes
git checkout master
git pull origin master
# Create release branch (e.g., for version 1.23)
git checkout -b release/v1.232a. Update version in Config.kt:
Edit build-logic/convention/src/main/kotlin/fr/shiningcat/simplehiit/config/Config.kt:
object ConfigHandheld {
val config =
AndroidConfig(
// ...
versionCode = 23100123, // Format: XXYYZZZZ (23=minSDK, 10=handheld, 0123=version)
versionName = "1.23",
// ...
)
}
object ConfigTv {
val config =
AndroidConfig(
// ...
versionCode = 23010123, // Format: XXYYZZZZ (23=minSDK, 01=TV, 0123=version)
versionName = "1.23",
// ...
)
}Version Code Format: XXYYZZZZ
XX= Min SDK version (23)YY= Device family (10=handheld, 01=TV)ZZZZ= Version number padded to 4 digits (e.g., 1.23 → 0123)
2b. Create F-Droid changelog (if app is on F-Droid):
Generate a draft changelog from git commits:
./scripts/generate-fdroid-changelog.sh 1.23 23100123This creates fastlane/metadata/android/en-US/changelogs/23100123.txt with commits since the last tag.
Then edit the generated file to:
- Replace
[EDIT THIS SUMMARY]with a brief version summary - Remove technical/internal commits not relevant for users
- Reword commits in user-friendly language
- Group related changes
Note: English-only is acceptable. F-Droid and GitHub changelogs don't need to be identical.
# Stage all changes (version + F-Droid metadata)
git add build-logic/convention/src/main/kotlin/fr/shiningcat/simplehiit/config/Config.kt
git add fastlane/metadata/ # if F-Droid changelogs were created
# Commit with clear message
git commit -m "Bump version to 1.23"
# Push the release branch
git push origin release/v1.23- Create PR from
release/v1.23tomaster - Wait for CI checks to pass
- Merge the PR
After the PR is merged to master:
# Update local master
git checkout master
git pull origin master
# Create version tag
git tag v1.23
# Explicitly push a tag (unambiguous)
git push origin refs/tags/v1.23
# Or use --tags to push all tags
git push --tagsAfter a version tag is pushed, F-Droid automatically detects and builds the new version:
- Detection occurs within 24-48 hours of tag push
- F-Droid fetches fastlane metadata (including changelogs) from the repository
- Build and publication takes an additional 1-3 days
- Monitor build status at: https://monitor.f-droid.org/
Note: No manual submission is needed for updates after initial F-Droid setup. See _WIP-plans/FDROID_PROCESS.md for F-Droid submission and maintenance documentation.
- Go to: https://github.com/shining-cat/SimpleHIIT/actions
- Watch the "Release Build" workflow complete (typically 5-10 minutes)
- Check for any errors in the workflow logs
If build fails with Gradle version inconsistencies:
- Go to: https://github.com/shining-cat/SimpleHIIT/actions/caches
- Delete all caches (or at least Gradle-related caches)
- Re-run the failed workflow or re-push the tag
- Go to: https://github.com/shining-cat/SimpleHIIT/releases
- Verify the new release appears with:
- Correct version tag
- Both mobile and TV APKs
- Auto-generated changelog from commits
- Download and test APKs on actual devices
The gradle/actions/setup-gradle@v4 action automatically caches Gradle artifacts to speed up builds:
- Gradle wrapper files
- Dependencies
- Build cache
- Configuration cache
This improves build times BUT can cause issues when Gradle/AGP versions change.
Clear GitHub Actions cache if you experience:
- ❌ Build failures after Gradle or AGP version changes
- ❌ Inconsistent metadata in APKs (e.g., wrong Gradle version in kotlin-tooling-metadata.json)
- ❌ Unexplained build errors that don't occur locally
Option 1: Manual Cache Deletion (Recommended)
- Go to: https://github.com/shining-cat/SimpleHIIT/actions/caches
- Click "Delete all caches" or select specific Gradle caches to delete
- Trigger a new build (push tag or re-run workflow)
Option 2: Disable Caching Temporarily
Modify .github/workflows/release.yml:
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
with:
cache-disabled: true # Force clean build, no cachingAfter one successful build, remove this flag to re-enable caching for future builds.
Option 3: Read-Only Cache Mode
Force cache refresh:
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
with:
cache-read-only: true # Ignore old cache, create fresh cacheAfter upgrading Gradle, AGP, or Kotlin versions, manually clear GitHub Actions caches before creating a release tag. This prevents stale cached artifacts from being included in release APKs.