fix(ci): load release signing from key properties
This commit is contained in:
@@ -87,6 +87,8 @@ jobs:
|
|||||||
run: flutter build appbundle --release
|
run: flutter build appbundle --release
|
||||||
|
|
||||||
- name: Verificar firma del AAB
|
- name: Verificar firma del AAB
|
||||||
|
env:
|
||||||
|
KEYSTORE_PASSWORD: ${{ secrets.PLURIWAVE_KEYSTORE_PASSWORD }}
|
||||||
run: |
|
run: |
|
||||||
echo "=== Huellas del keystore ==="
|
echo "=== Huellas del keystore ==="
|
||||||
keytool -list -v -keystore "$KEYSTORE_PATH" -alias $KEYSTORE_ALIAS -storepass "$KEYSTORE_PASSWORD" 2>/dev/null | grep "SHA1:\|SHA256:"
|
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")
|
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 {
|
android {
|
||||||
namespace = "es.freetimelab.pluriwave"
|
namespace = "es.freetimelab.pluriwave"
|
||||||
compileSdk = flutter.compileSdkVersion
|
compileSdk = flutter.compileSdkVersion
|
||||||
@@ -28,9 +40,23 @@ android {
|
|||||||
|
|
||||||
signingConfigs {
|
signingConfigs {
|
||||||
create("release") {
|
create("release") {
|
||||||
// Configurado por el workflow via android/key.properties
|
val storeFilePath = secret("KEYSTORE_PATH", "storeFile")
|
||||||
// Keystore: ~/.openclaw/workspace/.secure/pluriwave/pluriwave-upload.jks
|
val storePasswordValue = secret("KEYSTORE_PASSWORD", "storePassword")
|
||||||
// Alias: pluriwave-upload
|
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