Skip to content

Commit 2c6ba19

Browse files
author
Mikael Wills
committed
Github workflows added
1 parent a1c3908 commit 2c6ba19

File tree

3 files changed

+64
-0
lines changed

3 files changed

+64
-0
lines changed

.github/workflows/publish.yaml

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Publish plugin
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
- name: Install Flutter
13+
uses: subosito/flutter-action@v2
14+
with:
15+
channel: "stable"
16+
- name: Install project dependencies
17+
run: flutter pub get
18+
- name: Dart Format Check
19+
run: dart format lib/ test/ --set-exit-if-changed
20+
- name: Import Sorter Check
21+
run: flutter pub run import_sorter:main --no-comments --exit-if-changed
22+
- name: Dart Analyze Check
23+
run: flutter analyze
24+
- name: Dart Test Check
25+
run: flutter test
26+
#- name: Check Publish Warnings
27+
# run: dart pub publish --dry-run
28+
- name: Publish
29+
uses: k-paxian/[email protected]
30+
with:
31+
credentialJson: ${{ secrets.CREDENTIAL_JSON }}
32+
flutter: true
33+
skipTests: true
34+
force: true

.github/workflows/pushMaster.yaml

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Push To Master
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
build:
10+
name: Build Checks
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v2
14+
- name: Install Flutter
15+
uses: subosito/flutter-action@v2
16+
with:
17+
channel: "stable"
18+
- name: Install project dependencies
19+
run: flutter pub get
20+
- name: Dart Format Check
21+
run: dart format lib/ test/ --set-exit-if-changed
22+
- name: Import Sorter Check
23+
run: flutter pub run import_sorter:main --no-comments --exit-if-changed
24+
- name: Dart Analyze Check
25+
run: flutter analyze
26+
- name: Dart Test Check
27+
run: flutter test
28+
29+

pubspec.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ dependencies:
1717
dev_dependencies:
1818
flutter_test:
1919
sdk: flutter
20+
import_sorter: ^4.6.0
2021

2122
flutter:
2223
plugin:

0 commit comments

Comments
 (0)