-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathcodemagic.yaml
82 lines (79 loc) · 2.41 KB
/
codemagic.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
workflows:
android-workflow:
triggering:
events:
- push
branch_patterns:
- pattern: main
include: true
cancel_previous_builds: true
environment:
groups:
- google_play
vars:
PACKAGE_NAME: "com.haveinfinitehorizons"
GOOGLE_PLAY_TRACK: production
android_signing:
- keystore_reference
java: 17
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: 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=1.0.$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: production
ios-workflow:
triggering:
events:
- push
branch_patterns:
- pattern: main
include: true
cancel_previous_builds: true
integrations:
app_store_connect: code_megic_apple_connect_api
environment:
flutter: stable
ios_signing:
distribution_type: app_store
bundle_identifier: com.haveinfinitehorizons
scripts:
- name: Set up code signing settings on Xcode project
script: |
xcode-project use-profiles
- name: Get Flutter packages
script: |
flutter packages pub get
- name: Flutter build ipa
script: |
BUILD_NUMBER=$(($(app-store-connect get-latest-app-store-build-number 6502440548) + 1))
flutter build ipa --release \
--build-number=$BUILD_NUMBER \
--build-name=1.0.$BUILD_NUMBER \
--export-options-plist=/Users/builder/export_options.plist
artifacts:
- build/ios/ipa/*.ipa
- /tmp/xcodebuild_logs/*.log
- flutter_drive.log
publishing:
app_store_connect:
auth: integration
submit_to_app_store: true
cancel_previous_submissions: true
release_type: AFTER_APPROVAL