-
Notifications
You must be signed in to change notification settings - Fork 1
72 lines (59 loc) · 1.86 KB
/
main.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
name: Analysis and checking
on:
push:
branches:
- "main"
paths-ignore:
- "**/README.md"
pull_request:
branches:
- "main"
workflow_dispatch:
jobs:
check:
name: 🏗 Code analysing and checking
runs-on: ubuntu-latest
env:
JAVA_VERSION: "17"
FLUTTER_VERSION: "3.24.3"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: "zulu"
java-version: ${{env.JAVA_VERSION}}
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{env.FLUTTER_VERSION}}
channel: "stable"
- name: 📦 Package install
run: flutter pub get
- name: Download Google Play Services JSON
id: google_services
uses: timheuer/base64-to-file@v1.2
with:
fileName: "google-services.json"
encodedString: ${{ secrets.GOOGLE_SERVICE_BASE64 }}
- name: Create google-services.json
run: |
cp "${{ steps.google_services.outputs.filePath }}" android/app/
- name: Download firebase_options.dart
id: firebase_options
uses: timheuer/base64-to-file@v1.2
with:
fileName: "firebase_options.dart"
encodedString: ${{ secrets.FIREBASE_OPTION_DART }}
- name: Create firebase_options.dart
run: |
cp "${{ steps.firebase_options.outputs.filePath }}" lib/
- name: Create .env
run: |
touch .env
echo "ONESIGNAL_APP_ID=${{ secrets.ONESIGNAL_APP_ID }}" >> .env
cat .env
- name: 🔨 Run code generation
run: dart run build_runner build
- name: 🌐 Run easy localization
run: dart run easy_localization:generate -S assets/translations -O lib/src/l10n -o locale_keys.g.dart -f keys
- name: ✅ Run flutter analyze
run: flutter analyze