relatica/codemagic.yaml

51 wiersze
1.6 KiB
YAML

workflows:
android-workflow:
name: Android Workflow
instance_type: mac_mini_m1
max_build_duration: 120
environment:
android_signing:
- codemagickeystore
groups:
- google_play # <-- (Includes GCLOUD_SERVICE_ACCOUNT_CREDENTIALS)
vars:
PACKAGE_NAME: "social.myportal.relatica" # <-- Put your package name here
GOOGLE_PLAY_TRACK: "internal"
flutter: stable
scripts:
- name: Set up local.properties
script: |
echo "flutter.sdk=$HOME/programs/flutter" > "$CM_BUILD_DIR/android/local.properties"
- name: Get Flutter packages
script: |
flutter packages pub get
# - name: Flutter analyze
# script: |
# flutter analyze
# ignore_failure: true
- name: Flutter unit tests
script: |
flutter test
ignore_failure: true
- name: Build AAB with Flutter
script: |
BUILD_NUMBER=$(($(google-play get-latest-build-number --package-name "$PACKAGE_NAME" --tracks="$GOOGLE_PLAY_TRACK") + 1))
flutter build appbundle --release \
--build-name=0.9.0 \
--build-number=$PROJECT_BUILD_NUMBER
artifacts:
- build/**/outputs/**/*.aab
- build/**/outputs/**/mapping.txt
- flutter_drive.log
publishing:
email:
recipients:
- codemagic@myportal.social
notify:
success: true
failure: false
google_play:
credentials: $GCLOUD_SERVICE_ACCOUNT_CREDENTIALS
track: $GOOGLE_PLAY_TRACK
submit_as_draft: true