-
Notifications
You must be signed in to change notification settings - Fork 5
/
codemagic.yaml
139 lines (137 loc) · 4.01 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
definitions:
instance: &instance
max_build_duration: 60
env_versions: &env_versions
flutter: 3.7.1
xcode: 15.0
cocoapods: default
artifacts: &artifacts
- build/**/outputs/bundle/**/*.apk
- build/**/outputs/bundle/**/*.aab
- build/**/outputs/**/mapping.txt
- build/ios/ipa/*.ipa
- /tmp/xcodebuild_logs/*.log
- "*.snap"
- build/windows/**/*.msix
- flutter_drive.log
generic_publishing: &generic_publishing
slack:
channel: "#run-nepanikar-codemagic"
notify_on_build_start: false
scripts:
- &local_properties
name: Set up local.properties for Android
script: |
echo "flutter.sdk=$HOME/programs/flutter" > "$CM_BUILD_DIR/android/local.properties"
- &get_packages
name: Get Flutter packages
script: |
flutter pub get
- &build_android
name: Build Android
script: |
flutter build appbundle --release \
--build-name=$MAJOR_VERSION.$MINOR_VERSION.$BUILD_NUMBER \
--build-number=$((($MAJOR_VERSION*100000)+($MINOR_VERSION*10000)+$BUILD_NUMBER)) \
--verbose --no-tree-shake-icons
android-app-bundle build-universal-apk \
--bundle 'build/**/outputs/**/*.aab' \
--ks "$CM_KEYSTORE_PATH" \
--ks-pass "$CM_KEYSTORE_PASSWORD" \
--ks-key-alias "$CM_KEY_ALIAS" \
--key-pass "$CM_KEY_PASSWORD"
- &setup_ios
name: Set up iOS
script: |
xcode-project use-profiles
find . -name "Podfile" -execdir pod install \;
cat /Users/builder/export_options.plist
- &build_ios
name: Build iOS
script: |
flutter build ipa --export-options-plist=/Users/builder/export_options.plist \
--build-name=$MAJOR_VERSION.$MINOR_VERSION.$BUILD_NUMBER \
--build-number=$((($MAJOR_VERSION*100000)+($MINOR_VERSION*10000)+$BUILD_NUMBER)) \
--verbose --no-tree-shake-icons
- &publish_huawei
name: Publish to the Huawei AppGallery store
script: |
cd android
chmod +x gradlew
fastlane add_plugin huawei_appgallery_connect
bundle install
bundle exec fastlane huawei
workflows:
release:
name: Release
<<: *instance
integrations:
app_store_connect: Codemagic
environment:
<<: *env_versions
groups:
- app_gallery
- google_credentials
android_signing:
- Nepanikar-Android
ios_signing:
distribution_type: app_store
bundle_identifier: org.dontpanicapp
vars:
MAJOR_VERSION: "2"
MINOR_VERSION: "6"
TESTFLIGHT_EXTERNAL_GROUP_NAME: "App Store External Testing"
scripts:
- *local_properties
- *get_packages
- *build_android
- *setup_ios
- *build_ios
- *publish_huawei
artifacts: *artifacts
publishing:
<<: *generic_publishing
app_store_connect:
auth: integration
submit_to_testflight: false
submit_to_app_store: true
release_type: MANUAL
google_play:
credentials: $GCLOUD_SERVICE_ACCOUNT_CREDENTIALS
track: production
submit_as_draft: true
dev:
name: Development
<<: *instance
integrations:
app_store_connect: Codemagic
environment:
<<: *env_versions
android_signing:
- Nepanikar-Android
groups:
- google_credentials
ios_signing:
distribution_type: app_store
bundle_identifier: org.dontpanicapp
vars:
MAJOR_VERSION: "2"
MINOR_VERSION: "5"
TESTFLIGHT_EXTERNAL_GROUP_NAME: "App Store External Testing"
scripts:
- *local_properties
- *get_packages
- *build_android
- *setup_ios
- *build_ios
artifacts: *artifacts
publishing:
<<: *generic_publishing
app_store_connect:
auth: integration
submit_to_testflight: true
beta_groups:
- $TESTFLIGHT_EXTERNAL_GROUP_NAME
google_play:
credentials: $GCLOUD_SERVICE_ACCOUNT_CREDENTIALS
track: alpha