-
Notifications
You must be signed in to change notification settings - Fork 0
/
codemagic.yaml
84 lines (77 loc) · 2.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
workflows:
default-workflow:
name: Development
max_build_duration: 60
environment:
flutter: default
xcode: latest
cocoapods: default
scripts:
- |
# set up debug keystore
rm -f ~/.android/debug.keystore
keytool -genkeypair \
-alias androiddebugkey \
-keypass android \
-keystore ~/.android/debug.keystore \
-storepass android \
-dname 'CN=Android Debug,O=Android,C=US' \
-keyalg 'RSA' \
-keysize 2048 \
-validity 10000
- |
# set up local properties
echo "flutter.sdk=$HOME/programs/flutter" > "$FCI_BUILD_DIR/android/local.properties"
- flutter packages pub get
- flutter build appbundle --debug
- find . -name "Podfile" -execdir pod install \;
- flutter build ios --debug --no-codesign
artifacts:
- build/**/outputs/apk/**/*.apk
- build/**/outputs/bundle/**/*.aab
- build/**/outputs/**/mapping.txt
- build/ios/ipa/*.ipa
- /tmp/xcodebuild_logs/*.log
- build/windows/**/*.msix
- flutter_drive.log
publishing:
email:
recipients:
android-workflow:
scripts:
- name: Build Android APK
working_directory: android
script: ./gradlew assembleRelease
artifacts:
- app/build/outputs/**/**/*.apk
ios-workflow:
scripts:
- name: Add provisioning profiles
script: |
set -e # exit on first failed command
PROFILES_HOME="$HOME/Library/MobileDevice/Provisioning Profiles"
mkdir -p "$PROFILES_HOME"
echo ${PROVISIONING_PROFILE?} | base64 --decode > "$PROFILES_HOME/$(uuidgen).mobileprovision"
- name: Add signing certificate
script: |
set -e # exit on first failed command
echo ${CERTIFICATE?} | base64 --decode > /tmp/certificate.p12
keychain initialize
keychain add-certificates \
--certificate /tmp/certificate.p12 \
--certificate-password ${CERTIFICATE_PASSWORD?}
- name: Increment build number
script: agvtool new-version -all $BUILD_NUMBER
- name: Set up code signing settings on Xcode project
script: xcode-project use-profiles
- name: Build ipa for distribution
script: xcode-project build-ipa \
--workspace "${XCODE_WORKSPACE?}" \
--scheme "${XCODE_SCHEME?}"
artifacts:
- build/ios/ipa/*.ipa
cache-flutter-dart-dependencies-workflow:
cache:
cache_paths:
- $FLUTTER_ROOT/.pub-cache