-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcodemagic.yaml
149 lines (137 loc) · 3.82 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
138
139
140
141
142
143
144
145
146
147
148
definitions:
scripts:
- &run_build_runner
name: run build_runner
script: |
flutter packages pub run build_runner build --delete-conflicting-outputs
- &shorebird_install
name: Install Shorebird CLI
script: |
curl --proto '=https' --tlsv1.2 https://raw.githubusercontent.com/shorebirdtech/install/main/install.sh -sSf | bash
echo PATH="/Users/builder/.shorebird/bin:$PATH" >> $CM_ENV
- &setup_keystore
name: Setup the keystore
script: |
echo $KEYSTORE_FILE | base64 --decode > /tmp/keystore.jks
cat > "$CM_BUILD_DIR/android/key.properties" <<EOF
storePassword=$KEYSTORE_PASSWORD
keyPassword=$KEY_PASSWORD
keyAlias=$KEY_ALIAS
storeFile=/tmp/keystore.jks
EOF
- &get_dependancies
name: Get Flutter packages
script: |
flutter packages pub get
- &build_android
name: Build aab
script: |
shorebird release android
- &build_android_patch
name: create patch
script: |
shorebird patch android
- &apply_provisioning_profiles
name: Apply Provisioning Profiles
script: |
xcode-project use-profiles
- &build_ios
name: Build ipa
script: |
shorebird release ios -- --export-options-plist=/Users/builder/export_options.plist
- &build_ios_patch
name: iOS PATCH Build
script: |
shorebird patch ios
- &install_pods
name: Install pods
script: |
find . -name "Podfile" -execdir pod install \;
workflows:
release-workflow:
name: release Workflow
instance_type: mac_mini_m1
max_build_duration: 60
integrations:
app_store_connect: app store connect
environment:
ios_signing:
distribution_type: app_store
bundle_identifier: <app bundle id>
groups:
- shorebird_credentials
- google_credentials
- app_store_credentials
vars:
GOOGLE_PLAY_TRACK: "production"
flutter: stable
triggering:
events:
- tag
tag_patterns:
- pattern: 'v+([0-9]).+([0-9]).+([0-9])'
cancel_previous_builds: true
scripts:
- *shorebird_install
- *setup_keystore
- *get_dependancies
- *run_build_runner
- *apply_provisioning_profiles
- *install_pods
- *build_ios
- *build_android
artifacts:
- build/**/outputs/**/*.aab
- build/ios/ipa/*.ipa
publishing:
google_play:
credentials: $GCLOUD_SERVICE_ACCOUNT_CREDENTIALS
track: $GOOGLE_PLAY_TRACK
submit_as_draft: false
app_store_connect:
auth: integration
submit_to_testflight: true
submit_to_app_store: true
# Optional, defaults to MANUAL. Supported values: MANUAL, AFTER_APPROVAL or SCHEDULED
release_type: AFTER_APPROVAL
email:
recipients:
notify:
success: true
failure: true
patch-android-workflow:
name: Android Workflow
instance_type: mac_mini_m1
max_build_duration: 60
environment:
groups:
- shorebird_credentials
- google_credentials
vars:
GOOGLE_PLAY_TRACK: "production"
flutter: stable
triggering:
events:
- tag
tag_patterns:
- pattern: 'v+([0-9]).+([0-9]).+([0-9])-patch*'
cancel_previous_builds: true
scripts:
- *shorebird_install
- *setup_keystore
- *get_dependancies
- *run_build_runner
- *apply_provisioning_profiles
- *install_pods
- *build_ios_patch
- *build_android_patch
artifacts:
- build/**/outputs/**/*.aab
publishing:
email:
recipients:
notify:
success: true
failure: true