From 90226fe52bc887a2b1026f00b5c9566b3f27e88d Mon Sep 17 00:00:00 2001 From: Sambo Chea Date: Tue, 1 Jun 2021 23:07:23 +0700 Subject: [PATCH] Task: Add github workflow for tests and publish --- .github/workflows/dart-publish.yml | 19 +++++++++++++++++++ .github/workflows/dart.yml | 24 ++++++++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 .github/workflows/dart-publish.yml create mode 100644 .github/workflows/dart.yml diff --git a/.github/workflows/dart-publish.yml b/.github/workflows/dart-publish.yml new file mode 100644 index 0000000..e254559 --- /dev/null +++ b/.github/workflows/dart-publish.yml @@ -0,0 +1,19 @@ +name: Publish to Pub.dev + +on: + push: + branches: + - release + +jobs: + publishing: + runs-on: ubuntu-latest + steps: + - name: '>>> Checkout' + uses: actions/checkout@v2 + + - name: '>>> Publish Dart Package' + uses: k-paxian/dart-package-publisher@release + with: + accessToken: ${{ secrets.PUB_DEV_OAUTH_ACCESS_TOKEN }} + refreshToken: ${{ secrets.PUB_DEV_OAUTH_REFRESH_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml new file mode 100644 index 0000000..e2f84b4 --- /dev/null +++ b/.github/workflows/dart.yml @@ -0,0 +1,24 @@ +name: Dart + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - uses: dart-lang/setup-dart@9a04e6d73cca37bd455e0608d7e5092f881fd603 + + - name: Install dependencies + run: dart pub get + + - name: Analyze project source + run: dart analyze + + - name: Run tests + run: dart test