CI: an installable test APK on every push; a beta tag is a pre-release
CI / check (push) Canceled after 0s
CI / check (push) Canceled after 0s
Debug builds are signed with a public test key committed as app/test-debug.keystore (standard debug passwords, .debug application id only). A runner's own debug key is new each run, so every test build used to need the one before it uninstalled -- and a sign-in with it. The version name carries GITHUB_RUN_NUMBER (1.0.0-beta.1-debug.42), and the updater compares only what is before "-debug". ci.yml uploads llembas-android-debug-<run> with the full and fdroid debug APKs named by run and commit, and their SHA256SUMS. release.yml passes --prerelease for a tag with a suffix: beta.1's GitHub Release had to be marked by hand. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
8 files changed
+49
-5
No files matched your search
+14
-1
@@ -39,6 +39,17 @@ android {
|
||||
}
|
||||
|
||||
signingConfigs {
|
||||
// Debug builds are signed with a *public* test key that lives in the repository, so the
|
||||
// APK every CI run uploads installs over the one before it (a runner's own debug key is
|
||||
// new each run, and Android refuses an update from a different signer). It signs only
|
||||
// the `.debug` application id, never a release, and it is no secret: anyone can sign
|
||||
// with it, so install a debug build only from this repository's CI.
|
||||
getByName("debug") {
|
||||
storeFile = file("test-debug.keystore")
|
||||
storePassword = "android"
|
||||
keyAlias = "androiddebugkey"
|
||||
keyPassword = "android"
|
||||
}
|
||||
releaseKey?.let { key ->
|
||||
create("release") {
|
||||
storeFile = file(key.getProperty("file"))
|
||||
@@ -58,7 +69,9 @@ android {
|
||||
}
|
||||
debug {
|
||||
applicationIdSuffix = ".debug"
|
||||
versionNameSuffix = "-debug"
|
||||
// CI's run number, so a tester can tell two test builds apart in Settings › About.
|
||||
versionNameSuffix = "-debug" + (System.getenv("GITHUB_RUN_NUMBER")?.let { ".$it" } ?: "")
|
||||
signingConfig = signingConfigs.getByName("debug")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ class Updater(private val context: Context) {
|
||||
if (!it.isSuccessful) return@withContext context.getString(R.string.update_unreachable)
|
||||
LembasJson.decodeFromString(Latest.serializer(), it.body!!.string())
|
||||
}
|
||||
if (!newer(latest.version, BuildConfig.VERSION_NAME.removeSuffix("-debug"))) {
|
||||
if (!newer(latest.version, BuildConfig.VERSION_NAME.substringBefore("-debug"))) {
|
||||
return@withContext context.getString(R.string.update_none)
|
||||
}
|
||||
if (!context.packageManager.canRequestPackageInstalls()) {
|
||||
|
||||
Binary file not shown.
Reference in new issue
Block a user