Skip to content

Commit 2b2a06e

Browse files
committed
build: add package job
1 parent 3aba7e7 commit 2b2a06e

File tree

2 files changed

+37
-8
lines changed

2 files changed

+37
-8
lines changed

.github/workflows/build.yml

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
1-
name: F4LabCI
1+
name: F4LabCIBuildApk
22
on:
3-
push
3+
push:
4+
tags:
5+
- release-v* # Push events to tags release-v1.0, release-v1.1.x
46

57
jobs:
6-
test:
7-
name: Test on ${{ matrix.os }}
8+
build:
9+
name: Build on ${{ matrix.os }}
810
runs-on: ${{ matrix.os }}
911
strategy:
1012
matrix:
11-
os: [ubuntu-latest, windows-latest, macos-latest]
13+
os: [ubuntu-latest]
1214
steps:
1315
- uses: actions/checkout@v1
1416
- uses: actions/setup-java@v1
@@ -17,6 +19,10 @@ jobs:
1719
- uses: subosito/flutter-action@v1
1820
with:
1921
# same with pubspec.yaml
20-
flutter-version: '1.9.1+hotfix.2'
21-
- run: flutter pub get
22-
- run: flutter test --no-pub test/
22+
flutter-version: "1.9.1+hotfix.2"
23+
- name: flutter build
24+
- run: |
25+
flutter pub get
26+
flutter test --no-pub test/
27+
flutter build apk
28+
ls -l build/app/outputs/apk/release/app-release.apk

.github/workflows/check.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: F4LabCI
2+
on: push
3+
4+
jobs:
5+
check:
6+
name: Test on ${{ matrix.os }}
7+
runs-on: ${{ matrix.os }}
8+
strategy:
9+
matrix:
10+
os: [ubuntu-latest, windows-latest, macos-latest]
11+
steps:
12+
- uses: actions/checkout@v1
13+
- uses: actions/setup-java@v1
14+
with:
15+
java-version: "12.x"
16+
- uses: subosito/flutter-action@v1
17+
with:
18+
# same with pubspec.yaml
19+
flutter-version: "1.9.1+hotfix.2"
20+
- name: flutter check
21+
- run: |
22+
flutter pub get
23+
flutter test --no-pub test/

0 commit comments

Comments
 (0)