test 45
Some checks failed
Deploy Flutter to Firebase (Mac) / deploy-android (push) Failing after 1m46s
Some checks failed
Deploy Flutter to Firebase (Mac) / deploy-android (push) Failing after 1m46s
This commit is contained in:
@@ -21,14 +21,11 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
echo "${{ secrets.ENV_FILE }}" > .env
|
echo "${{ secrets.ENV_FILE }}" > .env
|
||||||
echo "${{ secrets.FIREBASE_CREDENTIALS }}" > ./android/firebase_credentials.json
|
echo "${{ secrets.FIREBASE_CREDENTIALS }}" > ./android/firebase_credentials.json
|
||||||
# On NE crée PAS key.properties ici pour éviter les doublons. On le fera proprement après.
|
|
||||||
|
|
||||||
- name: Lancer Fastlane (Audit Keystore)
|
- name: Lancer Fastlane (Déploiement)
|
||||||
working-directory: ./android
|
working-directory: ./android
|
||||||
env:
|
env:
|
||||||
ANDROID_KEYSTORE_BASE64: ${{ secrets.ANDROID_KEYSTORE_BASE64 }}
|
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 !
|
|
||||||
RAW_PROPERTIES: ${{ secrets.ANDROID_KEY_PROPERTIES }}
|
RAW_PROPERTIES: ${{ secrets.ANDROID_KEY_PROPERTIES }}
|
||||||
FIREBASE_ANDROID_APP_ID: ${{ secrets.FIREBASE_ANDROID_APP_ID }}
|
FIREBASE_ANDROID_APP_ID: ${{ secrets.FIREBASE_ANDROID_APP_ID }}
|
||||||
run: |
|
run: |
|
||||||
@@ -38,44 +35,32 @@ jobs:
|
|||||||
export GEM_PATH=$PWD/vendor/bundle
|
export GEM_PATH=$PWD/vendor/bundle
|
||||||
export PATH=$GEM_HOME/bin:$PATH
|
export PATH=$GEM_HOME/bin:$PATH
|
||||||
|
|
||||||
# 2. Génération Keystore
|
# 2. Génération Keystore & Properties (Méthode Validée ✅)
|
||||||
echo "🔓 Décodage du Keystore..."
|
echo "🔓 Décodage du Keystore..."
|
||||||
echo "$ANDROID_KEYSTORE_BASE64" | base64 -D > keystore.jks
|
echo "$ANDROID_KEYSTORE_BASE64" | base64 -D > keystore.jks
|
||||||
KEYSTORE_PATH=$(pwd)/keystore.jks
|
KEYSTORE_PATH=$(pwd)/keystore.jks
|
||||||
|
|
||||||
# 3. Récupération "Propre" des infos (Parsing du secret brut)
|
|
||||||
echo "$RAW_PROPERTIES" > temp_props.txt
|
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')
|
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_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')
|
KEY_ALIAS=$(grep "keyAlias" temp_props.txt | cut -d'=' -f2 | tr -d '\r')
|
||||||
|
|
||||||
echo "---------------------------------------------------"
|
# On recrée key.properties proprement
|
||||||
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 "storePassword=$STORE_PASS" > key.properties
|
||||||
echo "keyPassword=$KEY_PASS" >> key.properties
|
echo "keyPassword=$KEY_PASS" >> key.properties
|
||||||
echo "keyAlias=$KEY_ALIAS" >> key.properties
|
echo "keyAlias=$KEY_ALIAS" >> key.properties
|
||||||
echo "storeFile=$KEYSTORE_PATH" >> key.properties
|
echo "storeFile=$KEYSTORE_PATH" >> key.properties
|
||||||
|
|
||||||
echo "✅ Fichier key.properties régénéré proprement."
|
# 3. Préparation Gemfile (Avec le plugin Firebase cette fois !)
|
||||||
|
|
||||||
# 5. Préparation Fastlane
|
|
||||||
rm -rf vendor Gemfile.lock .bundle
|
rm -rf vendor Gemfile.lock .bundle
|
||||||
|
|
||||||
echo "source 'https://rubygems.org'" > Gemfile
|
echo "source 'https://rubygems.org'" > Gemfile
|
||||||
echo "gem 'fastlane', '>= 2.210.0'" >> Gemfile
|
echo "gem 'fastlane', '>= 2.210.0'" >> Gemfile
|
||||||
|
|
||||||
|
# --- 🔌 LE PLUGIN MANQUANT 🔌 ---
|
||||||
|
echo "gem 'fastlane-plugin-firebase_app_distribution'" >> Gemfile
|
||||||
|
|
||||||
|
# --- 🚑 CORRECTIFS RUBY 3.4 🚑 ---
|
||||||
echo "gem 'abbrev'" >> Gemfile
|
echo "gem 'abbrev'" >> Gemfile
|
||||||
echo "gem 'ostruct'" >> Gemfile
|
echo "gem 'ostruct'" >> Gemfile
|
||||||
echo "gem 'mutex_m'" >> Gemfile
|
echo "gem 'mutex_m'" >> Gemfile
|
||||||
@@ -85,8 +70,10 @@ jobs:
|
|||||||
echo "gem 'drb'" >> Gemfile
|
echo "gem 'drb'" >> Gemfile
|
||||||
echo "gem 'nkf'" >> Gemfile
|
echo "gem 'nkf'" >> Gemfile
|
||||||
|
|
||||||
|
# 4. Installation & Lancement
|
||||||
|
echo "⬇️ Installation..."
|
||||||
gem install bundler -v 2.7.2 --force --no-document
|
gem install bundler -v 2.7.2 --force --no-document
|
||||||
bundle _2.7.2_ update --jobs 4
|
bundle _2.7.2_ update --jobs 4
|
||||||
|
|
||||||
echo "🚀 Lancement..."
|
echo "🚀 Déploiement vers Firebase..."
|
||||||
bundle _2.7.2_ exec fastlane deploy_firebase
|
bundle _2.7.2_ exec fastlane deploy_firebase
|
||||||
Reference in New Issue
Block a user