Skip to content

Commit 9668028

Browse files
authored
Update flutter-actions.yml
add caching and rm podfile.lock
1 parent ab225d6 commit 9668028

File tree

1 file changed

+48
-5
lines changed

1 file changed

+48
-5
lines changed

.github/workflows/flutter-actions.yml

+48-5
Original file line numberDiff line numberDiff line change
@@ -9,33 +9,76 @@ jobs:
99
steps:
1010
- name: Clone repository
1111
uses: actions/checkout@v4
12+
13+
- name: Cache Flutter
14+
uses: actions/cache@v2
15+
id: flutter-cache
16+
with:
17+
key: $GITHUB_SHA-flutter
18+
path: ~/.flutter
19+
20+
- name: Cache Gradle
21+
uses: actions/cache@v2
22+
id: gradle-cache
23+
with:
24+
key: $GITHUB_SHA-gradle
25+
path: ~/.gradle
26+
1227
- name: Set up JDK 19
1328
uses: actions/setup-java@v4
1429
with:
15-
java-version: '19'
16-
distribution: 'temurin'
17-
cache: 'gradle'
30+
java-version: "19"
31+
cache: "gradle"
32+
1833
- name: Set up Flutter
1934
uses: subosito/flutter-action@v2
2035
with:
2136
channel: stable
2237
cache: true
38+
2339
- run: flutter pub get
40+
2441
- run: flutter build apk
2542

2643
build-ios:
2744
runs-on: macos-latest
2845
steps:
2946
- name: Clone repository
3047
uses: actions/checkout@v4
48+
49+
- name: Cache CocoaPods
50+
uses: actions/cache@v2
51+
id: cocoa-pods-cache
52+
with:
53+
key: $GITHUB_SHA-cocoa-pods
54+
path: ~/Library/Caches/CocoaPods
55+
56+
- name: Cache Xcode Derived Data
57+
uses: actions/cache@v2
58+
id: xcode-derived-data-cache
59+
with:
60+
key: $GITHUB_SHA-xcode-derived-data
61+
path: ~/Library/Developer/Xcode/DerivedData
62+
63+
- name: Cache Flutter
64+
uses: actions/cache@v2
65+
id: flutter-cache
66+
with:
67+
key: $GITHUB_SHA-flutter
68+
path: ~/.flutter
69+
3170
- name: Set up Flutter
3271
uses: subosito/flutter-action@v2
3372
with:
3473
channel: stable
3574
cache: true
75+
76+
- run: flutter pub get
77+
3678
- name: Update Cocoapods repo
3779
run: pod repo update
38-
- run: flutter pub get
80+
3981
- name: Install pods
40-
run: cd ios && pod install --repo-update && cd ..
82+
run: cd ios && rm Podfile.lock && pod install --repo-update && cd ..
83+
4184
- run: flutter build ios --release --no-codesign

0 commit comments

Comments
 (0)