From d1d219486123b734058a100a7d259c2fb4b0339c Mon Sep 17 00:00:00 2001 From: Van Leemput Dayron Date: Sun, 11 Jan 2026 00:04:59 +0100 Subject: [PATCH] test 30 --- .gitea/workflows/deploy.yaml | 43 +++++++++++++----------------------- 1 file changed, 15 insertions(+), 28 deletions(-) diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index f8acd5b..ae7258a 100644 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -1,4 +1,4 @@ -name: Deploy TravelMate (Android & iOS) +name: Deploy TravelMate (Full Mobile) on: push: branches: @@ -15,7 +15,6 @@ jobs: - name: Configuration Flutter & Secrets run: | flutter pub get - # On crée le .env à la racine pour éviter l'erreur d'asset echo "${{ secrets.ENV_FILE }}" > .env printf '%s' '${{ secrets.FIREBASE_CREDENTIALS }}' > ./android/firebase_credentials.json @@ -26,7 +25,7 @@ jobs: RAW_PROPERTIES: ${{ secrets.ANDROID_KEY_PROPERTIES }} FIREBASE_ANDROID_APP_ID: ${{ secrets.FIREBASE_ANDROID_APP_ID }} run: | - # 1. Préparation du Keystore + # 1. Keystore echo "$ANDROID_KEYSTORE_BASE64" | base64 -D > keystore.jks echo "$RAW_PROPERTIES" > temp_props.txt echo "storePassword=$(grep 'storePassword' temp_props.txt | cut -d'=' -f2 | tr -d '\r')" > key.properties @@ -34,24 +33,21 @@ jobs: echo "keyAlias=$(grep 'keyAlias' temp_props.txt | cut -d'=' -f2 | tr -d '\r')" >> key.properties echo "storeFile=$(pwd)/keystore.jks" >> key.properties - # 2. Gemfile Ruby 3.4 Patches + # 2. Gemfile (Correctifs Ruby 3.4 inclus) echo "source 'https://rubygems.org'" > Gemfile echo "gem 'fastlane', '>= 2.230.0'" >> Gemfile echo "gem 'fastlane-plugin-firebase_app_distribution'" >> Gemfile for g in abbrev ostruct mutex_m base64 csv bigdecimal drb nkf reline logger; do echo "gem '$g'" >> Gemfile; done gem install bundler -v 2.7.2 --no-document - bundle _2.7.2_ install + bundle _2.7.2_ update - # 3. Build APK (On remonte à la racine) + # 3. Build & Envoi cd .. && flutter build apk --release && cd android - - # 4. Envoi Firebase bundle _2.7.2_ exec fastlane run firebase_app_distribution \ app:"$FIREBASE_ANDROID_APP_ID" \ android_artifact_path:"../build/app/outputs/flutter-apk/app-release.apk" \ - service_credentials_file:"firebase_credentials.json" \ - release_notes:"Android build stable - Xcode 26.2 env" + service_credentials_file:"firebase_credentials.json" # --- JOB 2 : IOS (Génération IPA) --- deploy-ios: @@ -60,14 +56,14 @@ jobs: - name: Checkout code uses: actions/checkout@v3 - - name: Dépendances Flutter & iOS + - name: Dépendances iOS & Secrets run: | flutter pub get echo "${{ secrets.ENV_FILE }}" > .env printf '%s' '${{ secrets.FIREBASE_CREDENTIALS }}' > ./ios/firebase_credentials.json cd ios && (pod install --repo-update || pod update) - - name: Préparer le Code Signing (Mode Safe) + - name: Préparer le Code Signing (Xcode 26.2) env: P12_BASE: ${{ secrets.IOS_P12_BASE64 }} P12_PASS: ${{ secrets.IOS_P12_PASSWORD }} @@ -83,9 +79,8 @@ jobs: mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles echo "$PROV_BASE" | base64 -D -o ~/Library/MobileDevice/Provisioning\ Profiles/distribution.mobileprovision - - name: Build IPA (Standard Xcode 26.2) + - name: Build IPA run: | - # Nettoyage avant build pour garantir la détection des assets flutter clean flutter pub get flutter build ipa --release --export-method ad-hoc @@ -94,32 +89,24 @@ jobs: env: FIREBASE_IOS_APP_ID: ${{ secrets.FIREBASE_IOS_APP_ID }} run: | - export PATH="/opt/homebrew/opt/ruby/bin:/opt/homebrew/bin:$PATH" - gem install bundler -v 2.7.2 --no-document cd ios - - # Reconstruction du Gemfile + # Utilisation du Gemfile stabilisé echo "source 'https://rubygems.org'" > Gemfile echo "gem 'fastlane', '>= 2.230.0'" >> Gemfile echo "gem 'fastlane-plugin-firebase_app_distribution'" >> Gemfile for g in abbrev ostruct mutex_m base64 csv bigdecimal drb nkf reline logger; do echo "gem '$g'" >> Gemfile; done - bundle _2.7.2_ install + gem install bundler -v 2.7.2 --no-document + bundle _2.7.2_ update - # RECHERCHE DE L'IPA (Plus précise) + # RECHERCHE DYNAMIQUE DE L'IPA IPA_FILE=$(find ../build/ios/ipa -name "*.ipa" | head -n 1) - echo "📦 IPA localisée : $IPA_FILE" - - if [ -z "$IPA_FILE" ]; then - echo "❌ Erreur : IPA introuvable dans ../build/ios/ipa" - exit 1 - fi + echo "📦 IPA trouvée : $IPA_FILE" bundle _2.7.2_ exec fastlane run firebase_app_distribution \ app:"$FIREBASE_IOS_APP_ID" \ ipa_path:"$IPA_FILE" \ - service_credentials_file:"firebase_credentials.json" \ - release_notes: "iOS build stable - Xcode 26.2" + service_credentials_file:"firebase_credentials.json" - name: Nettoyage Final if: always()