diff --git a/.github/workflows/publish_pub_dev.yml b/.github/workflows/publish_pub_dev.yml new file mode 100644 index 0000000..0264609 --- /dev/null +++ b/.github/workflows/publish_pub_dev.yml @@ -0,0 +1,26 @@ +name: Publish to pub.dev + +on: + push: + tags: + - "[0-9]+.[0-9]+.[0-9]+" # tag pattern on pub.dev: '{{version}' + +# Publish using custom workflow +jobs: + publish: + permissions: + id-token: write # Required for authentication using OIDC + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: subosito/flutter-action@v2 + with: + channel: stable + cache: true + + - run: flutter doctor -v + - run: flutter pub get + - run: dart run build_runner build --delete-conflicting-outputs + + - run: flutter pub publish --force