From 1964774a6a2c2661fea3e628863ec7d3f416fd7b Mon Sep 17 00:00:00 2001 From: wang-bin Date: Thu, 8 Aug 2024 11:28:34 +0800 Subject: [PATCH] auto publish --- .github/workflows/pub.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/pub.yml diff --git a/.github/workflows/pub.yml b/.github/workflows/pub.yml new file mode 100644 index 0000000..a23275a --- /dev/null +++ b/.github/workflows/pub.yml @@ -0,0 +1,28 @@ +# https://dart.dev/tools/pub/automated-publishing#publishing-packages-using-github-actions +# .github/workflows/pub.yml +name: Publish to pub.dev + +on: + push: + tags: + - 'v[0-9]+.[0-9]+.[0-9]+*' # tag pattern on pub.dev: 'v{{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 + with: + submodules: 'recursive' + - uses: subosito/flutter-action@v2 + with: + channel: 'stable' + cache: true + - uses: dart-lang/setup-dart@v1 + # Here you can insert custom steps you need + # - run: dart tool/generate-code.dart + - name: Publish + run: dart pub publish --force \ No newline at end of file