preparing to deploy on ios
This commit is contained in:
85
.gitea/workflows/deploy-ios.yaml
Normal file
85
.gitea/workflows/deploy-ios.yaml
Normal file
@@ -0,0 +1,85 @@
|
||||
name: Deploy Flutter to Firebase iOS (Mac)
|
||||
on:
|
||||
push:
|
||||
branches: release
|
||||
|
||||
jobs:
|
||||
deploy-ios:
|
||||
runs-on: macos-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Configurer Xcode
|
||||
# Optionnel : force une version spécifique si besoin
|
||||
run: sudo xcode-select -s /Applications/Xcode_15.2.app
|
||||
|
||||
- name: Installer les dépendances Flutter & Cocoapods
|
||||
run: |
|
||||
flutter pub get
|
||||
cd ios
|
||||
pod install --repo-update
|
||||
cd ..
|
||||
|
||||
- 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 (Certificats)
|
||||
env:
|
||||
P12_CERTIFICATE_BASE64: ${{ secrets.IOS_P12_BASE64 }}
|
||||
P12_PASSWORD: ${{ secrets.IOS_P12_PASSWORD }}
|
||||
PROVISIONING_PROFILE_BASE64: ${{ secrets.IOS_PROVISION_BASE64 }}
|
||||
KEYCHAIN_PASSWORD: "temporary_password"
|
||||
run: |
|
||||
# 1. Créer un Keychain temporaire
|
||||
security create-keychain -p "$KEYCHAIN_PASSWORD" build.keychain
|
||||
security default-keychain -s build.keychain
|
||||
security unlock-keychain -p "$KEYCHAIN_PASSWORD" build.keychain
|
||||
security set-keychain-settings -t 3600 -u build.keychain
|
||||
|
||||
# 2. Importer le certificat .p12
|
||||
echo "$P12_CERTIFICATE_BASE64" | base64 -D -o certificate.p12
|
||||
security import certificate.p12 -k build.keychain -P "$P12_PASSWORD" -T /usr/bin/codesign
|
||||
security set-key-partition-list -S apple-tool:,apple: -s -k "$KEYCHAIN_PASSWORD" build.keychain
|
||||
|
||||
# 3. Importer le Profil de Provisionnement
|
||||
mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles
|
||||
echo "$PROVISIONING_PROFILE_BASE64" | base64 -D -o ~/Library/MobileDevice/Provisioning\ Profiles/distribution.mobileprovision
|
||||
|
||||
- name: Lancer Fastlane & Build IPA
|
||||
working-directory: ./ios
|
||||
env:
|
||||
FIREBASE_IOS_APP_ID: ${{ secrets.FIREBASE_IOS_APP_ID }}
|
||||
run: |
|
||||
# 1. Config Ruby (Identique à ton script Android)
|
||||
export PATH="/opt/homebrew/opt/ruby/bin:$PATH"
|
||||
export GEM_HOME=$PWD/vendor/bundle
|
||||
export GEM_PATH=$PWD/vendor/bundle
|
||||
export PATH=$GEM_HOME/bin:$PATH
|
||||
|
||||
# 2. Installation Fastlane
|
||||
rm -rf vendor Gemfile.lock .bundle
|
||||
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 install --path vendor/bundle
|
||||
|
||||
# 3. Construction de l'IPA via Flutter
|
||||
cd ..
|
||||
# On génère l'IPA. Flutter s'occupe de trouver le certificat dans le keychain
|
||||
flutter build ipa --release --export-method ad-hoc
|
||||
|
||||
cd ios
|
||||
|
||||
# 4. Envoi vers Firebase
|
||||
echo "🚀 Envoi de l'IPA vers Firebase..."
|
||||
bundle exec fastlane run firebase_app_distribution \
|
||||
app:"$FIREBASE_IOS_APP_ID" \
|
||||
ipa_path:"../build/ios/ipa/*.ipa" \
|
||||
service_credentials_file:"firebase_credentials.json" \
|
||||
release_notes:"Build iOS via Act"
|
||||
BIN
assets/icons/Icône de l'application.png
Normal file
BIN
assets/icons/Icône de l'application.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 137 KiB |
BIN
assets/icons/presentation_image.jpg
Normal file
BIN
assets/icons/presentation_image.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 182 KiB |
Reference in New Issue
Block a user