feat: build and sign Android releases on tag push via Forgejo
Some checks failed
Release APK / build (push) Failing after 40s

Reads the release keystore from env vars in CI, falling back to the
debug keys locally. Adds fastlane metadata for F-Droid/Obtainium and
a .forgejo workflow that builds, signs, and publishes the APK on
pushing a vX.Y.Z+N tag.
This commit is contained in:
randogoth 2026-10-14 10:54:00 +03:00
parent f386ef2c5b
commit 7e171862a5
8 changed files with 86 additions and 6 deletions

View file

@ -23,21 +23,28 @@ android {
}
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId = "page.mews.mews"
// You can update the following values to match your application needs.
// For more information, see: https://flutter.dev/to/review-gradle-config.
minSdk = flutter.minSdkVersion
targetSdk = flutter.targetSdkVersion
versionCode = flutter.versionCode
versionName = flutter.versionName
}
signingConfigs {
create("release") {
storeFile = System.getenv("KEYSTORE_PATH")?.let { file(it) }
storePassword = System.getenv("STORE_PASSWORD")
keyAlias = System.getenv("KEY_ALIAS")
keyPassword = System.getenv("KEY_PASSWORD")
}
}
buildTypes {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig = signingConfigs.getByName("debug")
// Falls back to the debug keys locally, so `flutter run --release`
// keeps working without a keystore on hand.
signingConfig = if (System.getenv("KEYSTORE_PATH") != null)
signingConfigs.getByName("release") else signingConfigs.getByName("debug")
}
}
}