diff --git a/.github/workflows/publish_pub.yaml b/.github/workflows/publish_pub.yaml new file mode 100644 index 0000000..a2be2df --- /dev/null +++ b/.github/workflows/publish_pub.yaml @@ -0,0 +1,12 @@ +name: Publish to pub.dev + +on: + push: + tags: + - "v[0-9]+.[0-9]+.[0-9]+*" + +jobs: + publish: + permissions: + id-token: write # Required for authentication using OIDC + uses: dart-lang/setup-dart/.github/workflows/publish.yml@v1 diff --git a/.github/workflows/unit_test.yaml b/.github/workflows/unit_test.yaml new file mode 100644 index 0000000..0ac6cdf --- /dev/null +++ b/.github/workflows/unit_test.yaml @@ -0,0 +1,21 @@ +name: Unit test + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + test: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - uses: dart-lang/setup-dart@v1 + - run: dart pub get + - run: dart format --output=none --set-exit-if-changed . + - run: dart analyze + - run: dart test