From 2abb080c09f93c560a29c4c1d93e4f281464014f Mon Sep 17 00:00:00 2001 From: Van Leemput Dayron Date: Mon, 15 Dec 2025 13:31:12 +0100 Subject: [PATCH] Test 46 --- .gitea/workflows/deploy-android.yaml | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/.gitea/workflows/deploy-android.yaml b/.gitea/workflows/deploy-android.yaml index f5c79a2..32c29a2 100644 --- a/.gitea/workflows/deploy-android.yaml +++ b/.gitea/workflows/deploy-android.yaml @@ -17,12 +17,24 @@ jobs: - name: Installer les dépendances Flutter run: flutter pub get - - name: Créer les fichiers secrets + - name: Créer les fichiers secrets (Avec Debug JSON) run: | echo "${{ secrets.ENV_FILE }}" > .env - echo "${{ secrets.FIREBASE_CREDENTIALS }}" > ./android/firebase_credentials.json + + # --- 📝 ÉCRITURE SÉCURISÉE DU JSON --- + # On utilise printf pour éviter que le shell ne mange les guillemets + printf '%s' '${{ secrets.FIREBASE_CREDENTIALS }}' > ./android/firebase_credentials.json + + echo "---------------------------------------------------" + echo "⚠️ DEBUG : Vérification du début du JSON Firebase" + echo "(Ne doit PAS être vide et doit commencer par { \"type\": ... )" + echo "---------------------------------------------------" + # On affiche juste les 50 premiers caractères pour ne pas fuiter tout le secret + head -c 50 ./android/firebase_credentials.json + echo "" + echo "---------------------------------------------------" - - name: Lancer Fastlane (Déploiement) + - name: Lancer Fastlane (Final) working-directory: ./android env: ANDROID_KEYSTORE_BASE64: ${{ secrets.ANDROID_KEYSTORE_BASE64 }} @@ -35,7 +47,7 @@ jobs: export GEM_PATH=$PWD/vendor/bundle export PATH=$GEM_HOME/bin:$PATH - # 2. Génération Keystore & Properties (Méthode Validée ✅) + # 2. Génération Keystore & Properties echo "🔓 Décodage du Keystore..." echo "$ANDROID_KEYSTORE_BASE64" | base64 -D > keystore.jks KEYSTORE_PATH=$(pwd)/keystore.jks @@ -45,22 +57,19 @@ jobs: 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') - # On recrée key.properties proprement echo "storePassword=$STORE_PASS" > key.properties echo "keyPassword=$KEY_PASS" >> key.properties echo "keyAlias=$KEY_ALIAS" >> key.properties echo "storeFile=$KEYSTORE_PATH" >> key.properties - # 3. Préparation Gemfile (Avec le plugin Firebase cette fois !) + # 3. Préparation Gemfile rm -rf vendor Gemfile.lock .bundle echo "source 'https://rubygems.org'" > Gemfile echo "gem 'fastlane', '>= 2.210.0'" >> Gemfile - - # --- 🔌 LE PLUGIN MANQUANT 🔌 --- echo "gem 'fastlane-plugin-firebase_app_distribution'" >> Gemfile - # --- 🚑 CORRECTIFS RUBY 3.4 🚑 --- + # Patchs Ruby 3.4 echo "gem 'abbrev'" >> Gemfile echo "gem 'ostruct'" >> Gemfile echo "gem 'mutex_m'" >> Gemfile