feat: Enhance Codemagic scripts for improved Firebase app distribution and build processes
This commit is contained in:
@@ -1,5 +1,37 @@
|
||||
# codemagic.yaml
|
||||
workflows:
|
||||
# =================================================================================
|
||||
# Reusable Scripts
|
||||
# =================================================================================
|
||||
build-script: &build-script
|
||||
name: Build Flutter App
|
||||
script: |
|
||||
flutter pub get
|
||||
# Uncomment the line below if you use build_runner
|
||||
# flutter pub run build_runner build --delete-conflicting-outputs
|
||||
|
||||
# Build Android
|
||||
flutter build appbundle --flavor $FLAVOR
|
||||
|
||||
# Build iOS
|
||||
flutter build ipa --flavor $FLAVOR --export-options-plist=$FCI_BUILD_DIR/mobile-apps/client-app/ios/exportOptions.plist
|
||||
|
||||
distribute-script: &distribute-script
|
||||
name: Distribute to Firebase App Distribution
|
||||
script: |
|
||||
# Distribute Android
|
||||
firebase appdistribution:distribute "build/app/outputs/bundle/${FLAVOR}Release/app-${FLAVOR}-release.aab" \
|
||||
--app $FIREBASE_APP_ID_ANDROID \
|
||||
--release-notes "Build $FCI_BUILD_NUMBER" \
|
||||
--groups "$FIREBASE_TESTER_GROUPS" \
|
||||
--token $FIREBASE_TOKEN
|
||||
|
||||
# Distribute iOS
|
||||
firebase appdistribution:distribute "build/ios/ipa/app.ipa" \
|
||||
--app $FIREBASE_APP_ID_IOS \
|
||||
--release-notes "Build $FCI_BUILD_NUMBER" \
|
||||
--groups "$FIREBASE_TESTER_GROUPS" \
|
||||
--token $FIREBASE_TOKEN
|
||||
|
||||
# =================================================================================
|
||||
# Base workflow for client_app
|
||||
# =================================================================================
|
||||
@@ -100,37 +132,4 @@ workflows:
|
||||
- staff_app_prod_credentials # Codemagic Environment Variable Group
|
||||
scripts:
|
||||
- *build-script
|
||||
- *distribute-script
|
||||
|
||||
# =================================================================================
|
||||
# Reusable Scripts
|
||||
# =================================================================================
|
||||
build-script: &build-script
|
||||
name: Build Flutter App
|
||||
script: |
|
||||
flutter pub get
|
||||
# Uncomment the line below if you use build_runner
|
||||
# flutter pub run build_runner build --delete-conflicting-outputs
|
||||
|
||||
# Build Android
|
||||
flutter build appbundle --flavor $FLAVOR
|
||||
|
||||
# Build iOS
|
||||
flutter build ipa --flavor $FLAVOR --export-options-plist=$FCI_BUILD_DIR/mobile-apps/client-app/ios/exportOptions.plist
|
||||
|
||||
distribute-script: &distribute-script
|
||||
name: Distribute to Firebase App Distribution
|
||||
script: |
|
||||
# Distribute Android
|
||||
firebase appdistribution:distribute "build/app/outputs/bundle/${FLAVOR}-release/app-${FLAVOR}-release.aab" \
|
||||
--app $FIREBASE_APP_ID_ANDROID \
|
||||
--release-notes "Build $FCI_BUILD_NUMBER" \
|
||||
--groups "$FIREBASE_TESTER_GROUPS" \
|
||||
--token $FIREBASE_TOKEN
|
||||
|
||||
# Distribute iOS
|
||||
firebase appdistribution:distribute "build/ios/ipa/app.ipa" \
|
||||
--app $FIREBASE_APP_ID_IOS \
|
||||
--release-notes "Build $FCI_BUILD_NUMBER" \
|
||||
--groups "$FIREBASE_TESTER_GROUPS" \
|
||||
--token $FIREBASE_TOKEN
|
||||
- *distribute-script
|
||||
Reference in New Issue
Block a user