-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
codemagic.yaml
152 lines (146 loc) · 4.91 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
149
workflows:
android-workflow:
name: Android Workflow
instance_type: mac_mini_m1
max_build_duration: 120
environment:
android_signing:
- keystore_reference
groups:
- google_play # <-- (Includes GCLOUD_SERVICE_ACCOUNT_CREDENTIALS)
vars:
PACKAGE_NAME: "com.katya.wtf" # <-- Put your package name here
GOOGLE_PLAY_TRACK: "stable"
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: Flutter analyze
script: |
flutter analyze
- name: Flutter unit tests
script: |
flutter test
ignore_failure: true
- 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=katya \
--build-number=$BUILD_NUMBER
artifacts:
- build/**/outputs/**/*.aab
- build/**/outputs/**/mapping.txt
- flutter_drive.log
publishing:
email:
recipients:
- dmitry.justdev@gmail.com
- preseed4@gmail.com
notify:
success: true
failure: false
google_play:
credentials: $GCLOUD_SERVICE_ACCOUNT_CREDENTIALS
track: $GOOGLE_PLAY_TRACK
submit_as_draft: true
ios-workflow:
name: iOS Workflow
instance_type: mac_mini_m1
max_build_duration: 120
integrations:
app_store_connect: codemagic
environment:
ios_signing:
distribution_type: app_store
bundle_identifier: com.katya.wtf
vars:
APP_ID: ### # <-- Put your APP ID here
flutter: stable
xcode: latest # <-- set to specific version e.g. 14.3, 15.0 to avoid unexpected updates.
cocoapods: default
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: Install pods
script: |
find . -name "Podfile" -execdir pod install \;
- name: Flutter analyze
script: |
flutter analyze
- name: Flutter unit tests
script: |
flutter test
ignore_failure: true
- name: Flutter build ipa and automatic versioning
script: |
flutter build ipa --release \
--build-name=katya \
--build-number=$(($(app-store-connect get-latest-app-store-build-number "$APP_ID") + 1)) \
--export-options-plist=/Users/builder/export_options.plist
artifacts:
- build/ios/ipa/*.ipa
- /tmp/xcodebuild_logs/*.log
- flutter_drive.log
publishing:
# See the following link for details about email publishing - https://docs.codemagic.io/publishing-yaml/distribution/#email
email:
recipients:
- dmitry.justdev@gmail.com
- preseed4@gmail.com
notify:
success: true # To receive a notification when a build succeeds
failure: false # To not receive a notification when a build fails
slack:
# See the following link about how to connect your Slack account - https://docs.codemagic.io/publishing-yaml/distribution/#slack
channel: "#builds"
notify_on_build_start: true # To receive a notification when a build starts
notify:
success: true # To receive a notification when a build succeeds
failure: false # To not receive a notification when a build fails
app_store_connect:
auth: integration
# Configuration related to TestFlight (optional)
# Note: This action is performed during post-processing.
submit_to_testflight: true
beta_groups: # Specify the names of beta tester groups that will get access to the build once it has passed beta review.
- group name 1
- group name 2
# Configuration related to App Store (optional)
# Note: This action is performed during post-processing.
submit_to_app_store: true
web-workflow:
name: Web app workflow
max_build_duration: 120
environment:
flutter: stable
scripts:
- name: Get Flutter packages
script: |
flutter packages pub get
- name: Flutter analyze
script: |
flutter analyze
- name: Flutter unit tests
script: |
flutter test
- name: Flutter build webapp
script: |
flutter build web --release
cd build/web
7z a -r ../web.zip ./*
artifacts:
- build/web.zip
- flutter_drive.log
publishing:
email:
recipients:
- dmitry.justdev@gmail.com