-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (34 loc) · 1.23 KB
/
android_release.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
name: android_release
on:
push:
tags: ["v*"]
jobs:
build:
name: Build and publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: "12.x"
- uses: subosito/flutter-action@v1
with:
channel: "stable"
- name: Get dependencies in workspace directory
run: flutter pub get
- name: Get dependencies in other packages directory
run: flutter pub run melos run pub:get
- name: Check code format
run: find . -name "*.dart" ! -name "firebase_options.dart" ! -name "*.g.dart" ! -name "*.freezed.dart" ! -name "*.i18n.dart" | tr '\n' ' ' | xargs flutter format --set-exit-if-changed
- name: Statically analyze
run: flutter analyze .
- name: Run tests
run: flutter pub run melos run test
- name: Building APK
working-directory: ./todo_app
run: flutter build apk --release --bundle-sksl-path android.sksl.json --dart-define=environment=production
- name: Publishing release
uses: ncipollo/release-action@v1
with:
artifacts: "todo_app/build/app/outputs/apk/release/*.apk"
token: ${{ secrets.TOKEN }}