Skip to content

Commit a0d8d41

Browse files
authored
Create build-example.yml
1 parent 7639450 commit a0d8d41

1 file changed

Lines changed: 49 additions & 0 deletions

File tree

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Build example
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
defaults:
13+
run:
14+
working-directory: ./example
15+
steps:
16+
- uses: actions/checkout@v2
17+
18+
- uses: actions/setup-java@2
19+
with:
20+
distribution: 'zulu'
21+
java-version: '11'
22+
23+
- uses: subosito/flutter-action@v1
24+
with:
25+
channel: 'stable'
26+
27+
- name: Print Dart SDK version
28+
run: dart --version
29+
30+
- name: Print Flutter SDK version
31+
run: flutter --version
32+
33+
- name: Install dependencies
34+
run: flutter pub get
35+
36+
- name: Format code
37+
run: flutter format lib --set-exit-if-changed
38+
39+
- name: Analyze
40+
run: flutter analyze lib
41+
42+
- name: Build APK
43+
run: flutter build apk --no-shrink
44+
45+
- name: Upload APK
46+
uses: actions/upload-artifact@v2
47+
with:
48+
name: app
49+
path: build/app/outputs/apk/release/app-release.apk

0 commit comments

Comments
 (0)