-
Notifications
You must be signed in to change notification settings - Fork 556
85 lines (68 loc) · 1.88 KB
/
flutter-actions.yml
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
name: build-app
on:
workflow_dispatch:
jobs:
build-android:
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v4
- name: Cache Flutter
uses: actions/cache@v2
id: flutter-cache
with:
key: $GITHUB_SHA-flutter
path: ~/.flutter
- name: Cache Gradle
uses: actions/cache@v2
id: gradle-cache
with:
key: $GITHUB_SHA-gradle
path: ~/.gradle
- name: Set up JDK 19
uses: actions/setup-java@v4
with:
java-version: "19"
distribution: 'temurin'
cache: "gradle"
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
cache: true
- run: flutter pub get
- run: flutter build apk
build-ios:
runs-on: macos-latest
steps:
- name: Clone repository
uses: actions/checkout@v4
- name: Cache CocoaPods
uses: actions/cache@v2
id: cocoa-pods-cache
with:
key: $GITHUB_SHA-cocoa-pods
path: ~/Library/Caches/CocoaPods
- name: Cache Xcode Derived Data
uses: actions/cache@v2
id: xcode-derived-data-cache
with:
key: $GITHUB_SHA-xcode-derived-data
path: ~/Library/Developer/Xcode/DerivedData
- name: Cache Flutter
uses: actions/cache@v2
id: flutter-cache
with:
key: $GITHUB_SHA-flutter
path: ~/.flutter
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
cache: true
- run: flutter pub get
- name: Update Cocoapods repo
run: pod repo update
- name: Install pods
run: cd ios && rm Podfile.lock && pod install --repo-update && cd ..
- run: flutter build ios --release --no-codesign