-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathaction.yml
More file actions
45 lines (40 loc) · 1.26 KB
/
Copy pathaction.yml
File metadata and controls
45 lines (40 loc) · 1.26 KB
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
name: 'Setup Flutter App'
description: 'Set up Flutter with dependencies, caching, and optional code generation'
inputs:
google-services-json:
description: 'Firebase google-services.json content'
required: true
generate-mocks:
description: 'Whether to run build_runner for mock generation'
required: false
default: 'false'
flutter-version:
description: 'Flutter version to use'
required: false
default: '3.38.3'
runs:
using: 'composite'
steps:
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: ${{ inputs.flutter-version }}
channel: 'stable'
cache: true
- name: Cache Flutter pub dependencies
uses: actions/cache@v4
with:
path: ~/.pub-cache
key: ${{ runner.os }}-pub-${{ hashFiles('**/pubspec.lock') }}
restore-keys: |
${{ runner.os }}-pub-
- name: Create Firebase google-services.json
shell: bash
run: echo '${{ inputs.google-services-json }}' > android/app/google-services.json
- name: Get dependencies
shell: bash
run: flutter pub get
- name: Generate mocks
if: inputs.generate-mocks == 'true'
shell: bash
run: dart run build_runner build --delete-conflicting-outputs