Skip to content

Commit 4d4d81c

Browse files
committed
Fix: Enable APK signing in CI/CD workflow
- Generate debug keystore in GitHub Actions for alpha releases - Configure release builds to use debug signing temporarily - This fixes "App not installed" errors when sideloading from GitHub releases For production releases, a proper release keystore should be configured.
1 parent 5dab1e2 commit 4d4d81c

2 files changed

Lines changed: 17 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,14 @@ jobs:
2525
- name: Grant execute permission for gradlew
2626
run: chmod +x gradlew
2727

28+
- name: Generate debug keystore for signing
29+
run: |
30+
mkdir -p ~/.android
31+
keytool -genkey -v -keystore ~/.android/debug.keystore \
32+
-storepass android -alias androiddebugkey -keypass android \
33+
-keyalg RSA -keysize 2048 -validity 10000 \
34+
-dname "CN=Android Debug,O=Android,C=US"
35+
2836
- name: Build Release APK
2937
run: ./gradlew assembleRelease
3038

app/build.gradle.kts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,14 @@ android {
4444
// }
4545
}
4646

47+
// Temporary: Use debug signing for alpha releases
48+
// TODO: Replace with proper release signing before production
49+
applicationVariants.all {
50+
if (buildType.name == "release") {
51+
signingConfig = signingConfigs.getByName("debug")
52+
}
53+
}
54+
4755
buildTypes {
4856
debug {
4957
applicationIdSuffix = ".debug"
@@ -58,6 +66,7 @@ android {
5866
isShrinkResources = true
5967
isDebuggable = false
6068
buildConfigField("boolean", "SHOW_FLIX_LOGO", "false") // Hide Flix logo in release
69+
// Signing handled by applicationVariants block below for now
6170
// signingConfig = signingConfigs.getByName("release") // Uncomment when signing config is set
6271
proguardFiles(
6372
getDefaultProguardFile("proguard-android-optimize.txt"),

0 commit comments

Comments
 (0)