kuwot-app/codemagic.yaml
fiatcode 355f505197 fix codemagic deployment (GH-1)
* update codemagic versioning

* remove unused branch_patterns

* remove unused env
2025-10-20 17:41:55 +07:00

64 lines
1.7 KiB
YAML

workflows:
android-workflow:
name: Android Workflow
instance_type: mac_mini_m2
max_build_duration: 30
triggering:
events:
- push
branch_patterns:
- pattern: 'dev'
include: true
source: false
environment:
android_signing:
- dhemasnurjaya_keystore
groups:
- app_secrets
- google_play_credentials
vars:
PACKAGE_NAME: "com.dhemasnurjaya.kuwot"
GOOGLE_PLAY_TRACK: "alpha"
flutter: stable
cache:
cache_paths:
- $HOME/.gradle/caches
- $FLUTTER_ROOT/.pub-cache
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
- name: Flutter unit tests
script: |
flutter test
ignore_failure: false
- name: Build AAB with Flutter
script: |
BUILD_NUMBER=$(($(google-play get-latest-build-number --package-name "$PACKAGE_NAME") + 1))
flutter build appbundle --release \
--dart-define=QUOTE_API_SCHEME=$QUOTE_API_SCHEME \
--dart-define=QUOTE_API_HOST=$QUOTE_API_HOST \
--dart-define=SENTRY_DSN=$SENTRY_DSN \
--build-name=1.2.$BUILD_NUMBER \
--build-number=$BUILD_NUMBER
artifacts:
- build/**/outputs/**/*.aab
- build/**/outputs/**/mapping.txt
- flutter_drive.log
publishing:
google_play:
credentials: $GCLOUD_SERVICE_ACCOUNT_CREDENTIALS
track: $GOOGLE_PLAY_TRACK
submit_as_draft: true