-
Notifications
You must be signed in to change notification settings - Fork 1
87 lines (68 loc) · 2.84 KB
/
dart.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
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
name: Dart
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# Note: This workflow uses the latest stable version of the Dart SDK.
# You can specify other versions if desired, see documentation here:
# https://github.com/dart-lang/setup-dart/blob/main/README.md
# - uses: dart-lang/setup-dart@v1
- uses: dart-lang/setup-dart@9a04e6d73cca37bd455e0608d7e5092f881fd603
# Setup Java environment in order to build the Android app.
- uses: actions/setup-java@v1
with:
java-version: '12.x'
# Setup the flutter environment.
- uses: subosito/flutter-action@v1
with:
channel: 'stable' # 'dev', 'alpha', default to: 'stable'
# flutter-version: '1.12.x' # you can also specify exact version of flutter
# --------------------------------------------------------------------------------
- name: Plugin - Install dependencies
run: flutter pub get
# Uncomment this step to verify the use of 'dart format' on each commit.
- name: Plugin - Verify formatting
run: dart format --set-exit-if-changed .
# Statically analyze the Dart code for any errors.
- name: Plugin - Analizing errors
run: flutter analyze .
# Run widget tests for our flutter project.
- name: Plugin - Widget Tests
run: flutter test
# --------------------------------------------------------------------------------
- name: Example - Install dependencies
working-directory: ./example
run: flutter pub get
# Uncomment this step to verify the use of 'dart format' on each commit.
- name: Example - Verify formatting
working-directory: ./example
run: dart format --set-exit-if-changed .
# Statically analyze the Dart code for any errors.
- name: Example - Analizing errors
working-directory: ./example
run: flutter analyze .
# Run widget tests for flutter project.
- name: Example - Widget Tests
working-directory: ./example
run: flutter test
# Build apk.
- name: Example - Building apk
working-directory: ./example
run: flutter build apk --release
# Upload generated apk to the artifacts.
- uses: actions/upload-artifact@v2
with:
name: release-apk
# There are 2 paths and lead to same file (Under outputs and flutter-apk)
# path: example/build/app/outputs/apk/release/app-release.apk
path: example/build/app/outputs/flutter-apk/app-release.apk