-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcodemagic.yaml
137 lines (120 loc) · 3.6 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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
workflows:
android-workflow:
name: Android Workflow
max_build_duration: 120
environment:
groups:
- prod
vars:
PACKAGE_NAME: com.assistantapps.assistant_dinkum_app
GOOGLE_PLAY_TRACK: 'production'
flutter: master
triggering:
events:
- tag
branch_patterns:
- pattern: 'main'
include: true
source: true
scripts:
- name: Write keystore file
script: |
echo $FCI_KEYSTORE_FILE | base64 --decode > $CM_BUILD_DIR/keystore.jks
- name: Write GoogleServices file
script: |
echo $GOOGLE_SERVICES | base64 --decode > $CM_BUILD_DIR/android/app/google-services.json
- name: Write env.dart file
script: |
echo $ENV_DART | base64 --decode > $CM_BUILD_DIR/lib/env.dart
- name: Get Flutter packages
script: |
flutter packages pub get
- name: Run version number
script: |
dart $CM_BUILD_DIR/scripts/version_num_script.dart
- name: Build AAB with Flutter
script: |
flutter build appbundle --release
- name: Build universal apk
script: |
android-app-bundle build-universal-apk \
--bundle 'build/**/outputs/**/*.aab' \
--ks $CM_BUILD_DIR/keystore.jks \
--ks-pass $FCI_KEYSTORE_PASSWORD \
--ks-key-alias $FCI_KEY_ALIAS \
--key-pass $FCI_KEY_PASSWORD
artifacts:
- build/**/outputs/**/*.aab
- build/**/outputs/**/*.apk
- build/**/outputs/**/mapping.txt
- flutter_drive.log
publishing:
google_play:
credentials: $GCLOUD_SERVICE_ACCOUNT_CREDENTIALS
track: $GOOGLE_PLAY_TRACK
slack:
channel: '#assistant-apps'
notify_on_build_start: true
notify:
success: true
failure: true
ios-workflow:
name: iOS Workflow
max_build_duration: 120
integrations:
app_store_connect: CodeMagic CICD Dinkum
environment:
groups:
- prod
ios_signing:
distribution_type: app_store
bundle_identifier: com.assistantapps.dinkum
flutter: master
xcode: latest
cocoapods: default
triggering:
events:
- tag
branch_patterns:
- pattern: 'main'
include: true
source: true
scripts:
- name: Write GoogleServices file
script: |
echo $GOOGLE_SERVICES | base64 --decode > $CM_BUILD_DIR/android/app/google-services.json
- name: Write env.dart file
script: |
echo $ENV_DART | base64 --decode > $CM_BUILD_DIR/lib/env.dart
- name: Get Flutter packages
script: |
flutter packages pub get
- name: Run version number
script: |
dart $CM_BUILD_DIR/scripts/version_num_script.dart
- name: Set up code signing settings on Xcode project
script: |
xcode-project use-profiles
- name: Install pods
script: |
find . -name "Podfile" -execdir pod install \;
- name: Flutter build ipa
script: |
flutter build ipa --release \
--export-options-plist=/Users/builder/export_options.plist
artifacts:
- build/ios/ipa/*.ipa
- /tmp/xcodebuild_logs/*.log
- flutter_drive.log
publishing:
slack:
channel: '#assistant-apps'
notify_on_build_start: true
notify:
success: true
failure: true
app_store_connect:
auth: integration
submit_to_testflight: true
submit_to_app_store: true
release_type: SCHEDULED