From a2ca59b1e199fba4f5d8f8994cc6e9796d953762 Mon Sep 17 00:00:00 2001 From: reeshika-h Date: Fri, 6 Feb 2026 16:19:01 +0530 Subject: [PATCH] Update workflow configurations and improve error handling for better integration and user experience. --- .github/workflows/publish.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 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..fca0c29 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,27 @@ +# .github/workflows/publish.yml +name: Publish to pub.dev + +on: + push: + tags: + - 'v[0-9]+.[0-9]+.[0-9]+' # must match tag pattern on pub.dev (e.g. 'v{{version}}') + workflow_dispatch: # manual trigger: runs dry-run only (pub.dev accepts publish only on tag push) + +jobs: + publish: + permissions: + id-token: write # Required for OIDC authentication + name: 'Publish to pub.dev' + environment: 'pub.dev' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: dart-lang/setup-dart@v1 + with: + sdk: stable + - name: Install dependencies + run: dart pub get + - name: Test Publish (Dry Run) + run: dart pub publish --dry-run + - name: Publish + run: dart pub publish --force \ No newline at end of file