fix(ci): load release signing from key properties
Build & Deploy Pluriwave / Análisis de código (push) Successful in 22s
Build & Deploy Pluriwave / Build APK + AAB release (push) Failing after 1m32s

This commit is contained in:
2026-05-25 21:49:45 +02:00
parent 03b56c98e7
commit 7dceed5dae
2 changed files with 31 additions and 3 deletions
+2
View File
@@ -87,6 +87,8 @@ jobs:
run: flutter build appbundle --release
- name: Verificar firma del AAB
env:
KEYSTORE_PASSWORD: ${{ secrets.PLURIWAVE_KEYSTORE_PASSWORD }}
run: |
echo "=== Huellas del keystore ==="
keytool -list -v -keystore "$KEYSTORE_PATH" -alias $KEYSTORE_ALIAS -storepass "$KEYSTORE_PASSWORD" 2>/dev/null | grep "SHA1:\|SHA256:"
+29 -3
View File
@@ -4,6 +4,18 @@ plugins {
id("dev.flutter.flutter-gradle-plugin")
}
import java.util.Properties
val keystoreProperties = Properties()
val keystorePropertiesFile = rootProject.file("key.properties")
if (keystorePropertiesFile.exists()) {
keystorePropertiesFile.inputStream().use { keystoreProperties.load(it) }
}
fun secret(name: String, propertyName: String): String? =
keystoreProperties.getProperty(propertyName)?.takeIf { it.isNotBlank() }
?: System.getenv(name)?.takeIf { it.isNotBlank() }
android {
namespace = "es.freetimelab.pluriwave"
compileSdk = flutter.compileSdkVersion
@@ -28,9 +40,23 @@ android {
signingConfigs {
create("release") {
// Configurado por el workflow via android/key.properties
// Keystore: ~/.openclaw/workspace/.secure/pluriwave/pluriwave-upload.jks
// Alias: pluriwave-upload
val storeFilePath = secret("KEYSTORE_PATH", "storeFile")
val storePasswordValue = secret("KEYSTORE_PASSWORD", "storePassword")
val keyAliasValue = secret("KEYSTORE_ALIAS", "keyAlias")
val keyPasswordValue = secret("KEY_PASSWORD", "keyPassword")
if (!storeFilePath.isNullOrBlank()) {
storeFile = file(storeFilePath)
}
if (!storePasswordValue.isNullOrBlank()) {
storePassword = storePasswordValue
}
if (!keyAliasValue.isNullOrBlank()) {
keyAlias = keyAliasValue
}
if (!keyPasswordValue.isNullOrBlank()) {
keyPassword = keyPasswordValue
}
}
}