feat(android): versioned Forgejo releases (android-v* + changelog + workflow) #1187
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/android-releases"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Versions and releases the Android app like wishlist-nextcloud: every
android-vX.Y.Ztag now produces a visible, separately-named Forgejo release at https://git.wiwie.dk/chris/memories/releases with German release notes and a fingerprint-gated APK.apps/android/app/build.gradle.ktsversionName0.4.2 → 0.5.0.versionCode = 17ledger (1 = 0.1.0 … 17 = 0.4.2) is replaced by a wishlist-style derivationmajor*1_000_000 + minor*1_000 + patch→ 5000 (monotonic, > 17). TheversionNameline is the single version source read by the release workflow.signingConfigs.releasewired to the stable debug keystore at$HOME/.android/debug.keystore(AGP's public debug credentials; the file itself comes from theANDROID_DEBUG_KEYSTORE_BASE64secret). Without this,assembleReleaseemits an unsigned APK and the fingerprint gate could never pass. Falls back to the debug signingConfig when the keystore file is absent (local builds).apps/android/CHANGELOG.md(new)Keep-a-Changelog, German, same preamble contract as wishlist's (adapted: workflow path
.forgejo/workflows/android-release.yml, tagsandroid-vX.Y.Z, header## [X.Y.Z]). First section: [0.5.0] - 2026-10-13 (Fotos neben der Karte / Schärfere Personenbilder)..forgejo/workflows/android-release.yml(new, purely additive)Adapted from wishlist's
release.yml, deliberately different where memories requires it:android-v*(v*stays the server-release namespace); strips theandroid-vprefix.runs-on: memories-deploy+gradle:8.13-jdk21container,ANDROID_HOME/GRADLE_USER_HOMEon/home/chris/git/.ci-cache/*, heavy-test lock around SDK/Gradle steps, Node 20 install — same pattern as the existingandroidjob in build-deploy.yml.changes-job mirror pattern (full history + tags, wishlist's fetch-depth: 0 equivalent) so the git-log notes fallback works.android-vX.Y.Zmust equalversionNameparsed frombuild.gradle.kts(fail hard).3be7737d…aebec(fail hard on mismatch/unsigned — same rationale as build-deploy.yml).## [X.Y.Z]section fromapps/android/CHANGELOG.md(tolerant awk matcher copied from wishlist); fallback groupsgit logsince the previousandroid-vtag into Neue Funktionen (feat*/ux*) / Behobene Fehler (fix*) / Sonstiges, excludingrelease:/spec:subjects; hard-fails on empty notes.https://git.wiwie.dk/api/v1(NOT the forgejo-release action — ISSUE-069: artifact backend unreachable from host-networked runner containers), mirroring the proven curl pattern from build-deploy.yml's rolling-release step: lookup by tag → create if 404 / reuse if 200, PATCH name+body (notes escaped to JSON via Node), delete old asset, POSTmemories-android-<version>.apk. Release is not a prerelease, namedMemories Android <version>.android-cichannel in build-deploy.yml is untouched.Validation
./gradlew :app:compileDebugKotlin :app:testDebugUnitTest --no-daemon→ BUILD SUCCESSFUL (pre-existing warnings only)../gradlew :app:assembleRelease --no-daemonlocally →app-release.apk,output-metadata.jsonshowsversionCode: 5000, versionName: "0.5.0"; apksigner reports SHA-2563be7737d9a07f5d1b91bf63ed40a18befa59fee8537d8dee79d5286a342aebec→ fingerprint gate OK.python3 yaml.safe_loadon android-release.yml → OK.ux(/feat(mapping andrelease:/spec:exclusions verified.run:blocks passsh -n/bash -n(the notes step declaresshell: bashfor wishlist's bash-isms; everything else stays POSIX sh).