diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml new file mode 100644 index 0000000..84b3fcd --- /dev/null +++ b/.github/workflows/publish.yaml @@ -0,0 +1,34 @@ +name: Publish plugin + +on: + release: + types: [published] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Install Flutter + uses: subosito/flutter-action@v2 + with: + channel: "stable" + - name: Install project dependencies + run: flutter pub get + - name: Dart Format Check + run: dart format lib/ test/ --set-exit-if-changed + - name: Import Sorter Check + run: flutter pub run import_sorter:main --no-comments --exit-if-changed + - name: Dart Analyze Check + run: flutter analyze + - name: Dart Test Check + run: flutter test + #- name: Check Publish Warnings + # run: dart pub publish --dry-run + - name: Publish + uses: k-paxian/dart-package-publisher@v1.5.1 + with: + credentialJson: ${{ secrets.CREDENTIAL_JSON }} + flutter: true + skipTests: true + force: true diff --git a/.github/workflows/pushMaster.yaml b/.github/workflows/pushMaster.yaml new file mode 100644 index 0000000..62b4ca2 --- /dev/null +++ b/.github/workflows/pushMaster.yaml @@ -0,0 +1,29 @@ +name: Push To Master + +on: + push: + branches: + - main + +jobs: + build: + name: Build Checks + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Install Flutter + uses: subosito/flutter-action@v2 + with: + channel: "stable" + - name: Install project dependencies + run: flutter pub get + - name: Dart Format Check + run: dart format lib/ test/ --set-exit-if-changed + - name: Import Sorter Check + run: flutter pub run import_sorter:main --no-comments --exit-if-changed + - name: Dart Analyze Check + run: flutter analyze + - name: Dart Test Check + run: flutter test + + diff --git a/lib/src/actions.dart b/lib/src/actions.dart index 85cc451..1833158 100644 --- a/lib/src/actions.dart +++ b/lib/src/actions.dart @@ -1,5 +1,4 @@ import 'package:callkeep/src/call.dart'; - import 'event.dart'; class CallKeepDidReceiveStartCallAction extends EventType { diff --git a/lib/src/api.dart b/lib/src/api.dart index 50655a6..45a8ea9 100644 --- a/lib/src/api.dart +++ b/lib/src/api.dart @@ -2,6 +2,7 @@ import 'dart:async'; import 'dart:io'; import 'package:flutter/services.dart'; + import 'package:logger/logger.dart'; import 'actions.dart'; diff --git a/lib/src/event.dart b/lib/src/event.dart index fd2ca82..74462a0 100644 --- a/lib/src/event.dart +++ b/lib/src/event.dart @@ -1,4 +1,5 @@ import 'package:flutter/cupertino.dart'; + import 'package:logger/web.dart'; abstract class EventType { diff --git a/pubspec.yaml b/pubspec.yaml index cd73f2d..4e90181 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -17,6 +17,7 @@ dependencies: dev_dependencies: flutter_test: sdk: flutter + import_sorter: ^4.6.0 flutter: plugin: