-
Notifications
You must be signed in to change notification settings - Fork 2
/
codemagic.yaml
99 lines (99 loc) · 2.64 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
workflows:
default-workflow:
name: Default Workflow
max_build_duration: 60
environment:
flutter: default
xcode: latest
cocoapods: default
groups:
- firebase
- script-signing
- artifacts
triggering:
events:
- push
branch_patterns:
- pattern: main
cancel_previous_builds: true
when:
changeset:
includes:
- '.'
excludes:
- 'game_scripts/*'
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 config --enable-web
- flutter build appbundle --release
- find . -name "Podfile" -execdir pod install \;
- flutter build ios --debug --no-codesign
- |
# build web
flutter build web --release
cd build/web
7z a -r ../web.zip ./*
artifacts:
- build/**/outputs/apk/**/*.apk
- build/**/outputs/bundle/**/*.aab
- build/**/outputs/**/mapping.txt
- build/ios/ipa/*.ipa
- /tmp/xcodebuild_logs/*.log
- build/web.zip
- '*.snap'
- build/windows/**/*.msix
- flutter_drive.log
publishing:
email:
recipients:
- maks@manichord.com
scripts:
- |
# get public urls with longer expiry time
tools/get_public_url.dart
sign-upload-only-workflow:
name: Sign and upload script Only Workflow
max_build_duration: 10
environment:
flutter: default
groups:
- firebase
- script-signing
triggering:
events:
- push
branch_patterns:
- pattern: main
cancel_previous_builds: true
when:
changeset:
includes:
- 'game_scripts/*'
scripts:
- name: get packages needed by signing script
script: |
flutter pub get
- name: sign lua script file
script: |
tools/sign_script.dart game_scripts/obstacles.lua
mkdir -p build/web
cp game_scripts/obstacles.lua build/web/
cp signature build/web/
- name: Publish to Firebase Hosting
script: |
firebase deploy --token "$FIREBASE_TOKEN"