test 43
Some checks failed
Deploy Flutter to Firebase (Mac) / deploy-android (push) Failing after 15s
Some checks failed
Deploy Flutter to Firebase (Mac) / deploy-android (push) Failing after 15s
This commit is contained in:
@@ -21,13 +21,16 @@ jobs:
|
||||
run: |
|
||||
echo "${{ secrets.ENV_FILE }}" > .env
|
||||
echo "${{ secrets.FIREBASE_CREDENTIALS }}" > ./android/firebase_credentials.json
|
||||
# On crée le fichier de base
|
||||
echo "${{ secrets.ANDROID_KEY_PROPERTIES }}" > ./android/key.properties
|
||||
# On NE crée PAS key.properties ici pour éviter les doublons. On le fera proprement après.
|
||||
|
||||
- name: Lancer Fastlane (Debug Keystore)
|
||||
- name: Lancer Fastlane (Audit Keystore)
|
||||
working-directory: ./android
|
||||
env:
|
||||
ANDROID_KEYSTORE_BASE64: ${{ secrets.ANDROID_KEYSTORE_BASE64 }}
|
||||
# On injecte les secrets un par un pour construire un fichier propre
|
||||
# ATTENTION : Assure-toi que ces variables existent dans tes secrets GitHub/Act !
|
||||
# Si tu n'as qu'un bloc de texte, laisse comme avant, je vais le parser.
|
||||
RAW_PROPERTIES: ${{ secrets.ANDROID_KEY_PROPERTIES }}
|
||||
FIREBASE_ANDROID_APP_ID: ${{ secrets.FIREBASE_ANDROID_APP_ID }}
|
||||
run: |
|
||||
# 1. Config Ruby
|
||||
@@ -41,31 +44,35 @@ jobs:
|
||||
echo "$ANDROID_KEYSTORE_BASE64" | base64 -D > keystore.jks
|
||||
KEYSTORE_PATH=$(pwd)/keystore.jks
|
||||
|
||||
# 3. Injection du chemin
|
||||
# 3. Récupération "Propre" des infos (Parsing du secret brut)
|
||||
echo "$RAW_PROPERTIES" > temp_props.txt
|
||||
|
||||
# On extrait les valeurs sans les chemins de fichier pollués
|
||||
STORE_PASS=$(grep "storePassword" temp_props.txt | cut -d'=' -f2 | tr -d '\r')
|
||||
KEY_PASS=$(grep "keyPassword" temp_props.txt | cut -d'=' -f2 | tr -d '\r')
|
||||
KEY_ALIAS=$(grep "keyAlias" temp_props.txt | cut -d'=' -f2 | tr -d '\r')
|
||||
|
||||
echo "---------------------------------------------------"
|
||||
echo "🕵️♂️ AUDIT DE VÉRITÉ AVEC KEYTOOL"
|
||||
echo "---------------------------------------------------"
|
||||
echo "On va tenter de lister le contenu du keystore avec le mot de passe : $STORE_PASS"
|
||||
|
||||
# COMMANDE CRITIQUE : Ceci va lister le vrai Alias contenu dans le fichier
|
||||
keytool -list -v -keystore keystore.jks -storepass "$STORE_PASS"
|
||||
|
||||
echo "---------------------------------------------------"
|
||||
echo "👉 Compare l'Alias ci-dessus (Alias name: ...) avec celui de ton secret : $KEY_ALIAS"
|
||||
echo "---------------------------------------------------"
|
||||
|
||||
# 4. Création d'un key.properties PROPRE (sans doublons)
|
||||
echo "storePassword=$STORE_PASS" > key.properties
|
||||
echo "keyPassword=$KEY_PASS" >> key.properties
|
||||
echo "keyAlias=$KEY_ALIAS" >> key.properties
|
||||
echo "storeFile=$KEYSTORE_PATH" >> key.properties
|
||||
|
||||
# --- 🕵️♂️ DIAGNOSTIC DU CONTENU 🕵️♂️ ---
|
||||
echo "---------------------------------------------------"
|
||||
echo "⚠️ DEBUG : Vérification du contenu de key.properties"
|
||||
echo "(Vérifie bien qu'il y a 4 lignes : storePassword, keyPassword, keyAlias, storeFile)"
|
||||
echo "---------------------------------------------------"
|
||||
cat key.properties
|
||||
echo "---------------------------------------------------"
|
||||
echo "✅ Fichier key.properties régénéré proprement."
|
||||
|
||||
# Petit check automatique pour t'aider
|
||||
if grep -q "keyPassword" key.properties; then
|
||||
echo "✅ keyPassword trouvé.";
|
||||
else
|
||||
echo "❌ ERREUR : keyPassword manquant !";
|
||||
fi
|
||||
|
||||
if grep -q "keyAlias" key.properties; then
|
||||
echo "✅ keyAlias trouvé.";
|
||||
else
|
||||
echo "❌ ERREUR : keyAlias manquant !";
|
||||
fi
|
||||
|
||||
# 4. Préparation Fastlane
|
||||
# 5. Préparation Fastlane
|
||||
rm -rf vendor Gemfile.lock .bundle
|
||||
|
||||
echo "source 'https://rubygems.org'" > Gemfile
|
||||
|
||||
Reference in New Issue
Block a user