-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcodemagic.yaml
More file actions
147 lines (144 loc) · 4.19 KB
/
codemagic.yaml
File metadata and controls
147 lines (144 loc) · 4.19 KB
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
definitions:
environment:
shared_env: &shared_env
flutter: 3.24.1
groups:
- shorebird
- app_store
- play_store
vars:
BUNDLE_ID: dev.shorebird.codemagic-demo
FLUTTER_VERSION: 3.24.1
scripts:
- &shorebird_install
name: Install Shorebird
script: |
# Install Shorebird
curl --proto '=https' --tlsv1.2 https://raw.githubusercontent.com/shorebirdtech/install/main/install.sh -sSf | bash
# Add Shorebird to PATH
echo PATH="$HOME/.shorebird/bin:$PATH" >> $CM_ENV
- &ios_initialize_keychain
name: Set up keychain to be used for codesigning using Codemagic CLI 'keychain' command
script: |
keychain initialize
- &fetch_signing_files
name: Fetch signing files
script: |
app-store-connect fetch-signing-files "$BUNDLE_ID" \
--type IOS_APP_STORE --create \
--issuer-id "$ISSUER_ID" \
--key-id "$KEY_ID" \
--private-key="$APP_STORE_CONNECT_PRIVATE_KEY"
- &add_certs_to_keychain
name: Add certs to keychain
script: |
keychain add-certificates
- &use_profiles
name: Set up code signing settings on Xcode project
script: |
xcode-project use-profiles --custom-export-options={\"manageAppVersionAndBuildNumber\":false}
- &fetch_dependencies
name: Fetch Dependencies
script: |
flutter pub get
- &analyze_and_test
name: Analyze and Test
script: |
flutter analyze
flutter test
workflows:
release-android-workflow:
name: Release Android
instance_type: mac_mini_m1
environment:
<<: *shared_env
android_signing:
- android_keystore
scripts:
- *shorebird_install
- *fetch_dependencies
- *analyze_and_test
- name: Shorebird Release
script: |
shorebird release android \
--flutter-version="$FLUTTER_VERSION"
artifacts:
- build/**/outputs/**/*.aab
- build/**/outputs/**/mapping.txt
- flutter_drive.log
publishing:
google_play:
credentials: $GCLOUD_SERVICE_ACCOUNT_CREDENTIALS
track: internal
release-ios-workflow:
name: Release iOS
instance_type: mac_mini_m1
integrations:
app_store_connect: Codemagic
environment:
<<: *shared_env
ios_signing:
distribution_type: app_store
bundle_identifier: "$BUNDLE_ID"
scripts:
- *shorebird_install
- *fetch_dependencies
- *analyze_and_test
- *fetch_signing_files
- *ios_initialize_keychain
- *add_certs_to_keychain
- *use_profiles
- name: Shorebird Release
script: |
cat /Users/builder/export_options.plist
shorebird release ios \
--flutter-version="$FLUTTER_VERSION" \
--export-options-plist=/Users/builder/export_options.plist
artifacts:
- build/ios/ipa/*.ipa
publishing:
app_store_connect:
auth: integration
submit_to_testflight: true
patch-android-workflow:
name: Patch Android
instance_type: mac_mini_m1
environment:
<<: *shared_env
android_signing:
- android_keystore
inputs:
release_version:
description: The release version to patch
scripts:
- *shorebird_install
- *fetch_dependencies
- *analyze_and_test
- name: Shorebird Patch
script: |
shorebird patch android \
--release-version=${{ inputs.release_version }}
patch-ios-workflow:
name: Patch iOS
instance_type: mac_mini_m1
environment:
<<: *shared_env
ios_signing:
distribution_type: app_store
bundle_identifier: "$BUNDLE_ID"
inputs:
release_version:
description: The release version to patch
scripts:
- *shorebird_install
- *fetch_dependencies
- *analyze_and_test
- *fetch_signing_files
- *ios_initialize_keychain
- *add_certs_to_keychain
- *use_profiles
- name: Shorebird Patch
script: |
shorebird patch ios \
--release-version=${{ inputs.release_version }} \
--export-options-plist=/Users/builder/export_options.plist