From 4c766b968a205cfc3479ff0f2f74e1976d8cf15b Mon Sep 17 00:00:00 2001 From: beeth0ven Date: Tue, 14 Dec 2021 08:39:54 +0800 Subject: [PATCH 1/2] add workflow 'Publish to Pub.dev' --- .github/workflows/publish.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..9ffa46e --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,20 @@ +name: Publish to Pub.dev + +on: + release: + types: [published] + +jobs: + publishing: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Publish + uses: k-paxian/dart-package-publisher@v1.3 + with: + flutter: true + accessToken: ${{ secrets.OAUTH_ACCESS_TOKEN }} + refreshToken: ${{ secrets.OAUTH_REFRESH_TOKEN }} + format: true \ No newline at end of file From f3d0bef0aa894e133faa064ff89da7f84c3406c6 Mon Sep 17 00:00:00 2001 From: beeth0ven Date: Tue, 14 Dec 2021 08:45:43 +0800 Subject: [PATCH 2/2] add workflow 'Tests' --- .github/workflows/tests.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/tests.yml diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..e1ec534 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,28 @@ +name: Tests + +on: + push: + branches: [main] + paths-ignore: ['**.md'] + pull_request: + branches: [main] + paths-ignore: ['**.md'] + +jobs: + test: + runs-on: ubuntu-latest + + strategy: + matrix: + channel: [stable, beta] + + steps: + - uses: actions/checkout@v2.4.0 + - uses: subosito/flutter-action@v1.5.3 + with: + channel: ${{ matrix.channel }} + - run: flutter pub get + - run: flutter analyze + - run: flutter test --coverage + - name: Upload coverage reports + uses: codecov/codecov-action@v2.1.0 \ No newline at end of file