test 16
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
name: Deploy Flutter to Firebase iOS (Final & Safe)
|
name: Deploy Flutter to Firebase iOS (Final)
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: release
|
branches: release
|
||||||
@@ -11,66 +11,87 @@ jobs:
|
|||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Nettoyage et Dépendances
|
- name: Vérifier l'environnement Xcode 26.2
|
||||||
|
run: |
|
||||||
|
# Utilise le moteur de build optimisé de Xcode 26.2
|
||||||
|
xcodebuild -version
|
||||||
|
flutter doctor -v
|
||||||
|
|
||||||
|
- name: Installer les dépendances (Flutter & Pods)
|
||||||
run: |
|
run: |
|
||||||
flutter pub get
|
flutter pub get
|
||||||
cd ios && pod install --repo-update && cd ..
|
cd ios
|
||||||
|
# Mise à jour forcée pour éviter les conflits Firebase/Firestore 12.6.0
|
||||||
|
pod install --repo-update || pod update
|
||||||
|
cd ..
|
||||||
|
|
||||||
- name: Préparer le Code Signing (Final)
|
- name: Créer les fichiers secrets
|
||||||
|
run: |
|
||||||
|
echo "${{ secrets.ENV_FILE }}" > .env
|
||||||
|
printf '%s' '${{ secrets.FIREBASE_CREDENTIALS }}' > ./ios/firebase_credentials.json
|
||||||
|
|
||||||
|
- name: Préparer le Code Signing (Mode Mac Perso Safe)
|
||||||
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 complet
|
# 1. Nettoyage et création d'un trousseau isolé
|
||||||
security delete-keychain build.keychain || true
|
security delete-keychain build.keychain || true
|
||||||
|
|
||||||
# 2. Création du trousseau temporaire
|
|
||||||
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. LIER LE TROUSSEAU (Indispensable pour Xcode 26.2)
|
# 2. Lien vers la session sans changer le trousseau par défaut (évite le bug "Upsell")
|
||||||
# On l'ajoute à la liste de recherche pour que Xcode le trouve
|
|
||||||
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 du certificat Apple Distribution
|
# 3. Import du certificat de Distribution
|
||||||
echo "$P12_BASE" | base64 -D -o cert.p12
|
echo "$P12_BASE" | base64 -D -o cert.p12
|
||||||
|
# Autorise explicitement codesign pour éviter les popups bloquants
|
||||||
security import cert.p12 -k build.keychain -P "$P12_PASS" -T /usr/bin/codesign -T /usr/bin/productsign
|
security import cert.p12 -k build.keychain -P "$P12_PASS" -T /usr/bin/codesign -T /usr/bin/productsign
|
||||||
|
|
||||||
# 5. Autoriser la signature automatique
|
|
||||||
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
|
||||||
|
|
||||||
# 6. Installation du Profil (be.devdayronvl.TravelMate)
|
# 4. Installation du Profil de Provisionnement (be.devdayronvl.TravelMate)
|
||||||
mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles
|
mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles
|
||||||
echo "$PROV_BASE" | base64 -D -o ~/Library/MobileDevice/Provisioning\ Profiles/dist.mobileprovision
|
echo "$PROV_BASE" | base64 -D -o ~/Library/MobileDevice/Provisioning\ Profiles/distribution.mobileprovision
|
||||||
|
|
||||||
# 7. DEBUG : Vérifier que Xcode "voit" bien une identité valide
|
|
||||||
echo "Identités de signature détectées :"
|
|
||||||
security find-identity -v -p codesigning build.keychain
|
|
||||||
|
|
||||||
- name: Build IPA (Optimisé Xcode 26.2)
|
- name: Build IPA (Force Manual Distribution)
|
||||||
run: |
|
run: |
|
||||||
# Xcode 26.2 accélère cette étape grâce au nouveau cache
|
# On force Xcode 26.2 à utiliser l'identité de distribution et non de développement
|
||||||
flutter build ipa --release --export-method ad-hoc
|
flutter build ipa --release \
|
||||||
|
--export-method ad-hoc \
|
||||||
|
--code-signing-manual \
|
||||||
|
--code-signing-identity "Apple Distribution"
|
||||||
|
|
||||||
- name: Envoi Firebase via Fastlane
|
- name: Envoi Firebase via Fastlane (Bundler 2.7.2)
|
||||||
env:
|
env:
|
||||||
FIREBASE_IOS_APP_ID: ${{ secrets.FIREBASE_IOS_APP_ID }}
|
FIREBASE_IOS_APP_ID: ${{ secrets.FIREBASE_IOS_APP_ID }}
|
||||||
run: |
|
run: |
|
||||||
|
# Configuration Ruby 3.4 & Bundler compatible Fastlane
|
||||||
|
export PATH="/opt/homebrew/opt/ruby/bin:/opt/homebrew/bin:$PATH"
|
||||||
gem install bundler -v 2.7.2 --no-document
|
gem install bundler -v 2.7.2 --no-document
|
||||||
|
|
||||||
cd ios
|
cd ios
|
||||||
|
# Utilisation de la syntaxe stricte pour Bundler 2.7.2
|
||||||
bundle _2.7.2_ config set path 'vendor/bundle'
|
bundle _2.7.2_ config set path 'vendor/bundle'
|
||||||
|
|
||||||
|
# Création du Gemfile moderne
|
||||||
|
echo "source 'https://rubygems.org'" > Gemfile
|
||||||
|
echo "gem 'fastlane', '>= 2.210.0'" >> Gemfile
|
||||||
|
echo "gem 'fastlane-plugin-firebase_app_distribution'" >> Gemfile
|
||||||
|
echo "gem 'base64'" >> Gemfile
|
||||||
|
|
||||||
bundle _2.7.2_ install
|
bundle _2.7.2_ install
|
||||||
|
|
||||||
|
echo "🚀 Envoi vers Firebase..."
|
||||||
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"
|
release_notes:"Build Flutter iOS via Xcode 26.2"
|
||||||
|
|
||||||
- name: Nettoyage Automatique
|
- name: Nettoyage du Système
|
||||||
if: always() # Se lance même si le build échoue
|
if: always()
|
||||||
run: |
|
run: |
|
||||||
# On remet l'ordre des trousseaux à la normale pour ton Mac perso
|
# Restauration de la configuration normale de ton Mac
|
||||||
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
|
|
||||||
@@ -340,10 +340,14 @@
|
|||||||
inputFileListPaths = (
|
inputFileListPaths = (
|
||||||
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
|
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
|
||||||
);
|
);
|
||||||
|
inputPaths = (
|
||||||
|
);
|
||||||
name = "[CP] Embed Pods Frameworks";
|
name = "[CP] Embed Pods Frameworks";
|
||||||
outputFileListPaths = (
|
outputFileListPaths = (
|
||||||
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
|
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
|
||||||
);
|
);
|
||||||
|
outputPaths = (
|
||||||
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
shellPath = /bin/sh;
|
shellPath = /bin/sh;
|
||||||
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
|
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
|
||||||
@@ -372,10 +376,14 @@
|
|||||||
inputFileListPaths = (
|
inputFileListPaths = (
|
||||||
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist",
|
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist",
|
||||||
);
|
);
|
||||||
|
inputPaths = (
|
||||||
|
);
|
||||||
name = "[CP] Copy Pods Resources";
|
name = "[CP] Copy Pods Resources";
|
||||||
outputFileListPaths = (
|
outputFileListPaths = (
|
||||||
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist",
|
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist",
|
||||||
);
|
);
|
||||||
|
outputPaths = (
|
||||||
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
shellPath = /bin/sh;
|
shellPath = /bin/sh;
|
||||||
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n";
|
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n";
|
||||||
@@ -490,7 +498,11 @@
|
|||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
||||||
|
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
|
||||||
|
CODE_SIGN_STYLE = Manual;
|
||||||
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
||||||
|
DEVELOPMENT_TEAM = "";
|
||||||
|
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 456VVYXDFN;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
INFOPLIST_FILE = Runner/Info.plist;
|
INFOPLIST_FILE = Runner/Info.plist;
|
||||||
LD_RUNPATH_SEARCH_PATHS = (
|
LD_RUNPATH_SEARCH_PATHS = (
|
||||||
@@ -499,6 +511,8 @@
|
|||||||
);
|
);
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = be.devdayronvl.TravelMate;
|
PRODUCT_BUNDLE_IDENTIFIER = be.devdayronvl.TravelMate;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
|
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||||
|
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = myiphone;
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||||
SWIFT_VERSION = 5.0;
|
SWIFT_VERSION = 5.0;
|
||||||
VERSIONING_SYSTEM = "apple-generic";
|
VERSIONING_SYSTEM = "apple-generic";
|
||||||
@@ -673,7 +687,11 @@
|
|||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
||||||
|
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
|
||||||
|
CODE_SIGN_STYLE = Manual;
|
||||||
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
||||||
|
DEVELOPMENT_TEAM = "";
|
||||||
|
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 456VVYXDFN;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
INFOPLIST_FILE = Runner/Info.plist;
|
INFOPLIST_FILE = Runner/Info.plist;
|
||||||
LD_RUNPATH_SEARCH_PATHS = (
|
LD_RUNPATH_SEARCH_PATHS = (
|
||||||
@@ -682,6 +700,8 @@
|
|||||||
);
|
);
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = be.devdayronvl.TravelMate;
|
PRODUCT_BUNDLE_IDENTIFIER = be.devdayronvl.TravelMate;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
|
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||||
|
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = myiphone;
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||||
SWIFT_VERSION = 5.0;
|
SWIFT_VERSION = 5.0;
|
||||||
@@ -696,7 +716,11 @@
|
|||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
||||||
|
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
|
||||||
|
CODE_SIGN_STYLE = Manual;
|
||||||
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
||||||
|
DEVELOPMENT_TEAM = "";
|
||||||
|
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 456VVYXDFN;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
INFOPLIST_FILE = Runner/Info.plist;
|
INFOPLIST_FILE = Runner/Info.plist;
|
||||||
LD_RUNPATH_SEARCH_PATHS = (
|
LD_RUNPATH_SEARCH_PATHS = (
|
||||||
@@ -705,6 +729,8 @@
|
|||||||
);
|
);
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = be.devdayronvl.TravelMate;
|
PRODUCT_BUNDLE_IDENTIFIER = be.devdayronvl.TravelMate;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
|
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||||
|
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = myiphone;
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||||
SWIFT_VERSION = 5.0;
|
SWIFT_VERSION = 5.0;
|
||||||
VERSIONING_SYSTEM = "apple-generic";
|
VERSIONING_SYSTEM = "apple-generic";
|
||||||
|
|||||||
Reference in New Issue
Block a user