feat: Set up Fastlane for Android with Firebase App Distribution and adjust build configurations.
Some checks failed
Deploy Flutter to Firebase / deploy-android (push) Has been cancelled
Some checks failed
Deploy Flutter to Firebase / deploy-android (push) Has been cancelled
This commit is contained in:
26
android/fastlane/Fastfile
Normal file
26
android/fastlane/Fastfile
Normal file
@@ -0,0 +1,26 @@
|
||||
default_platform(:android)
|
||||
|
||||
platform :android do
|
||||
desc "Déploiement Firebase via Gitea"
|
||||
lane :deploy_firebase do
|
||||
# 1. Décoder le Keystore depuis les secrets Gitea (voir Phase 4)
|
||||
# On vérifie si le fichier existe déjà pour éviter d'écraser en local
|
||||
if ENV['ANDROID_KEYSTORE_BASE64']
|
||||
File.open("upload-keystore.jks", "wb") do |f|
|
||||
f.write(Base64.decode64(ENV['ANDROID_KEYSTORE_BASE64']))
|
||||
end
|
||||
end
|
||||
|
||||
# 2. Construire l'APK
|
||||
flutter_build(build: "apk")
|
||||
# Note: Fastlane a un plugin flutter, ou utilisez sh("flutter build apk --release")
|
||||
|
||||
# 3. Envoyer à Firebase
|
||||
firebase_app_distribution(
|
||||
app: ENV["FIREBASE_ANDROID_APP_ID"],
|
||||
service_credentials_file: "firebase_credentials.json",
|
||||
groups: "testers",
|
||||
release_notes: "Build automatique depuis Gitea Commit: #{ENV['GITHUB_SHA']}"
|
||||
)
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user