-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (38 loc) · 1.3 KB
/
ci.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
name: CI
on: pull_request
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: "19"
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
- name: Get project dependencies
run: flutter pub get
- name: Check code formatting
run: dart format --set-exit-if-changed .
- name: Run linter check
run: flutter analyze
- name: Run unit tests
run: flutter test
- name: Build APK files
run: flutter build apk --dart-define=TASKY_ENV=prod --dart-define=TASKY_API_TOKEN=${{ secrets.TASKY_API_TOKEN }}
- name: Upload artifacts to GitHub
uses: actions/upload-artifact@v4
with:
path: build/app/outputs/flutter-apk/app-release.apk
- name: Upload artifacts to Firebase App Distribution
uses: wzieba/Firebase-Distribution-Github-Action@v1
with:
appId: ${{ secrets.FIREBASE_APP_ID }}
serviceCredentialsFileContent: ${{ secrets.CREDENTIALS_FILE_CONTENT }}
file: build/app/outputs/flutter-apk/app-release.apk