-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcodemagic.yaml
80 lines (75 loc) · 2.06 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
workflows:
android-release-workflow:
name: Android Workflow
max_build_duration: 120
environment:
android_signing:
- booksGenie_android_key
vars:
PACKAGE_NAME: "io.codemagic.fluttersample"
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
ignore_failure: true
script: |
flutter analyze
- name: Build APK with Flutter
script: |
flutter build apk --split-per-abi --release
artifacts:
- build/**/outputs/**/*.apk
- build/**/outputs/**/mapping.txt
- flutter_drive.log
windows-release-workflow:
name: Windows Workflow
environment:
flutter: stable
scripts:
- name: Get Flutter packages
script: |
flutter packages pub get
- name: Flutter analyze
script: |
flutter analyze
ignore_failure: true
- name: Build Flutter Windows App
script: |
flutter config --enable-windows-desktop
flutter build windows --release
cd build/windows/runner/Release
- name: Create package
script: |
flutter pub run msix:create
artifacts:
- build/windows/**/*.msix
publishing-workflow:
environment:
flutter: stable
groups:
- books_genie
triggering:
events:
- tag
cancel_previous_builds: true
branch_patterns:
- pattern: '*'
include: true
source: true
scripts:
- name: Publish to GitHub
script: |
#!/usr/bin/env zsh
if [ -z ${CM_TAG} ]; then
echo "Not a tag build, will not publish GitHub release"
exit 0
fi
gh release create "${CM_TAG}" \
--title "BooksGenie ${CM_TAG}" \
build/**/outputs/**/*.apk \
build/windows/**/*.msix