Skip to content

Commit 4125709

Browse files
committed
Add github actions.
1 parent 7b87c29 commit 4125709

File tree

2 files changed

+50
-0
lines changed

2 files changed

+50
-0
lines changed

.github/workflows/build.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
test:
11+
name: Test on ${{ matrix.os }}
12+
runs-on: ${{ matrix.os }}
13+
strategy:
14+
matrix:
15+
os: [ubuntu-latest]
16+
17+
steps:
18+
- uses: actions/checkout@v2
19+
- uses: actions/setup-java@v1
20+
with:
21+
java-version: '12.x'
22+
- uses: subosito/flutter-action@v1
23+
with:
24+
flutter-version: '2.2.3'
25+
channel: 'stable'
26+
- run: dart pub get
27+
- run: dart format lib/ test/ --set-exit-if-changed
28+
- run: dart pub run import_sorter:main --no-comments --exit-if-changed
29+
- run: dart analyze

.github/workflows/publish.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Publish plugin
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
publish:
9+
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v1
15+
- name: Publish
16+
uses: sakebook/actions-flutter-pub-publisher@v1.3.1
17+
with:
18+
credential: ${{ secrets.CREDENTIAL_JSON }}
19+
flutter_package: true
20+
skip_test: true
21+
dry_run: false

0 commit comments

Comments
 (0)