Some checks failed
Deploy Flutter to Firebase (Mac) / deploy-android (push) Failing after 32s
68 lines
2.3 KiB
YAML
68 lines
2.3 KiB
YAML
name: Deploy Flutter to Firebase (Mac)
|
|
on:
|
|
push:
|
|
branches: release
|
|
|
|
jobs:
|
|
deploy-android:
|
|
runs-on: macos-latest
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Vérifier l'installation Flutter
|
|
run: flutter doctor -v
|
|
|
|
- name: Installer les dépendances Flutter
|
|
run: flutter pub get
|
|
|
|
- name: Créer les fichiers secrets
|
|
run: |
|
|
echo "${{ secrets.ENV_FILE }}" > .env
|
|
echo "${{ secrets.FIREBASE_CREDENTIALS }}" > ./android/firebase_credentials.json
|
|
echo "${{ secrets.ANDROID_KEY_PROPERTIES }}" > ./android/key.properties
|
|
|
|
- name: Lancer Fastlane (Compatibilité Bundler 2.x)
|
|
working-directory: ./android
|
|
env:
|
|
ANDROID_KEYSTORE_BASE64: ${{ secrets.ANDROID_KEYSTORE_BASE64 }}
|
|
FIREBASE_ANDROID_APP_ID: ${{ secrets.FIREBASE_ANDROID_APP_ID }}
|
|
run: |
|
|
# 1. Activation de Ruby Homebrew
|
|
export PATH="/opt/homebrew/opt/ruby/bin:$PATH"
|
|
echo "✅ Ruby actif : $(ruby -v)"
|
|
|
|
# 2. Configuration Environnement Local
|
|
export GEM_HOME=$PWD/vendor/bundle
|
|
export GEM_PATH=$PWD/vendor/bundle
|
|
export PATH=$GEM_HOME/bin:$PATH
|
|
|
|
# 3. Nettoyage
|
|
rm -rf vendor Gemfile.lock .bundle
|
|
|
|
# --- 📜 GEMFILE 📜 ---
|
|
echo "source 'https://rubygems.org'" > Gemfile
|
|
echo "gem 'fastlane', '>= 2.210.0'" >> Gemfile
|
|
# Patchs pour Ruby 3.4+
|
|
echo "gem 'abbrev'" >> Gemfile
|
|
echo "gem 'ostruct'" >> Gemfile
|
|
echo "gem 'mutex_m'" >> Gemfile
|
|
echo "gem 'base64'" >> Gemfile
|
|
echo "gem 'csv'" >> Gemfile
|
|
echo "gem 'bigdecimal'" >> Gemfile
|
|
echo "gem 'drb'" >> Gemfile
|
|
|
|
echo "📝 Gemfile généré."
|
|
|
|
# 4. INSTALLATION SPÉCIFIQUE
|
|
echo "⬇️ Installation de Bundler 2.7.2 (Pour compatibilité Fastlane)..."
|
|
# On installe précisément la version que Fastlane réclame (< 3.0.0)
|
|
gem install bundler -v 2.7.2 --force
|
|
|
|
echo "📦 Installation des gems..."
|
|
# La syntaxe '_2.7.2_' force l'utilisation de CETTE version précise
|
|
bundle _2.7.2_ update --jobs 4
|
|
|
|
echo "🚀 Lancement..."
|
|
bundle _2.7.2_ exec fastlane deploy_firebase |