Test 14
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
name: Deploy Flutter to Firebase iOS (Safe Mode)
|
name: Deploy Flutter to Firebase iOS (Final & Safe)
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: release
|
branches: release
|
||||||
@@ -11,45 +11,49 @@ jobs:
|
|||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Installer Dépendances
|
- name: Nettoyage et Dépendances
|
||||||
run: |
|
run: |
|
||||||
flutter pub get
|
flutter pub get
|
||||||
cd ios && pod install --repo-update && cd ..
|
cd ios && pod install --repo-update && cd ..
|
||||||
|
|
||||||
- name: Préparer le Code Signing (Mode Safe)
|
- name: Préparer le Code Signing (Mode Non-Invasif)
|
||||||
env:
|
env:
|
||||||
P12_BASE: ${{ secrets.IOS_P12_BASE64 }}
|
P12_BASE: ${{ secrets.IOS_P12_BASE64 }}
|
||||||
P12_PASS: ${{ secrets.IOS_P12_PASSWORD }}
|
P12_PASS: ${{ secrets.IOS_P12_PASSWORD }}
|
||||||
PROV_BASE: ${{ secrets.IOS_PROVISION_BASE64 }}
|
PROV_BASE: ${{ secrets.IOS_PROVISION_BASE64 }}
|
||||||
run: |
|
run: |
|
||||||
# 1. Nettoyage préventif
|
# 1. On supprime l'ancien keychain de build s'il existe
|
||||||
security delete-keychain build.keychain || true
|
security delete-keychain build.keychain || true
|
||||||
|
|
||||||
# 2. Création SANS mise par défaut
|
# 2. Création du keychain SANS le mettre par défaut
|
||||||
|
# Cela évite que tes autres apps (NordPass, Upsell) ne perdent leurs accès.
|
||||||
security create-keychain -p "" build.keychain
|
security create-keychain -p "" build.keychain
|
||||||
security unlock-keychain -p "" build.keychain
|
security unlock-keychain -p "" build.keychain
|
||||||
|
|
||||||
# 3. AJOUT À LA LISTE DE RECHERCHE UNIQUEMENT
|
# 3. On l'ajoute à la liste de recherche UNIQUEMENT
|
||||||
# Cette commande permet à Xcode de trouver le certificat sans bloquer le reste du Mac
|
# Xcode pourra lire dedans, mais le reste du Mac restera sur 'login'
|
||||||
security list-keychains -d user -s build.keychain $(security list-keychains -d user | xargs)
|
security list-keychains -d user -s build.keychain $(security list-keychains -d user | xargs)
|
||||||
|
|
||||||
# 4. Importation (Xcode 26.2 optimized)
|
# 4. Importation du certificat (Xcode 26.2)
|
||||||
echo "$P12_BASE" | base64 -D -o cert.p12
|
echo "$P12_BASE" | base64 -D -o cert.p12
|
||||||
security import cert.p12 -k build.keychain -P "$P12_PASS" -T /usr/bin/codesign
|
security import cert.p12 -k build.keychain -P "$P12_PASS" -T /usr/bin/codesign
|
||||||
|
|
||||||
|
# 5. Autorisation de signature sans popup
|
||||||
security set-key-partition-list -S apple-tool:,apple: -s -k "" build.keychain
|
security set-key-partition-list -S apple-tool:,apple: -s -k "" build.keychain
|
||||||
|
|
||||||
# 5. Installation du Profil
|
# 6. Installation du Profil de Provisionnement
|
||||||
mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles
|
mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles
|
||||||
echo "$PROV_BASE" | base64 -D -o ~/Library/MobileDevice/Provisioning\ Profiles/distribution.mobileprovision
|
echo "$PROV_BASE" | base64 -D -o ~/Library/MobileDevice/Provisioning\ Profiles/distribution.mobileprovision
|
||||||
|
|
||||||
- name: Build IPA & Firebase
|
- name: Build IPA (Optimisé Xcode 26.2)
|
||||||
|
run: |
|
||||||
|
# Xcode 26.2 accélère cette étape grâce au nouveau cache
|
||||||
|
flutter build ipa --release --export-method ad-hoc
|
||||||
|
|
||||||
|
- name: Envoi Firebase via Fastlane
|
||||||
env:
|
env:
|
||||||
FIREBASE_IOS_APP_ID: ${{ secrets.FIREBASE_IOS_APP_ID }}
|
FIREBASE_IOS_APP_ID: ${{ secrets.FIREBASE_IOS_APP_ID }}
|
||||||
run: |
|
run: |
|
||||||
# Build optimisé Xcode 26.2
|
|
||||||
flutter build ipa --release --export-method ad-hoc
|
|
||||||
|
|
||||||
# Envoi Firebase via Fastlane (Bundler 2.7.2 forcé)
|
|
||||||
gem install bundler -v 2.7.2 --no-document
|
gem install bundler -v 2.7.2 --no-document
|
||||||
cd ios
|
cd ios
|
||||||
bundle _2.7.2_ config set path 'vendor/bundle'
|
bundle _2.7.2_ config set path 'vendor/bundle'
|
||||||
@@ -57,11 +61,13 @@ jobs:
|
|||||||
bundle _2.7.2_ exec fastlane run firebase_app_distribution \
|
bundle _2.7.2_ exec fastlane run firebase_app_distribution \
|
||||||
app:"$FIREBASE_IOS_APP_ID" \
|
app:"$FIREBASE_IOS_APP_ID" \
|
||||||
ipa_path:"../build/ios/ipa/*.ipa" \
|
ipa_path:"../build/ios/ipa/*.ipa" \
|
||||||
service_credentials_file:"firebase_credentials.json"
|
service_credentials_file:"firebase_credentials.json" \
|
||||||
|
release_notes:"Build stable via Xcode 26.2"
|
||||||
|
|
||||||
- name: Nettoyage Final (Indispensable)
|
- name: Nettoyage Automatique
|
||||||
if: always()
|
if: always() # Se lance même si le build échoue
|
||||||
run: |
|
run: |
|
||||||
# On remet la liste des keychains à l'état normal
|
# On remet l'ordre des trousseaux à la normale pour ton Mac perso
|
||||||
security list-keychains -d user -s login.keychain
|
security list-keychains -d user -s login.keychain
|
||||||
security delete-keychain build.keychain || true
|
security delete-keychain build.keychain || true
|
||||||
|
rm -f ios/firebase_credentials.json
|
||||||
Reference in New Issue
Block a user