fix(ci): load release signing from key properties
This commit is contained in:
@@ -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:"
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user