From 815175e56d847fb48b1fc5fb195b495b35db006f Mon Sep 17 00:00:00 2001 From: Joachim Nohl <43643339+nohli@users.noreply.github.com> Date: Sat, 1 Aug 2026 09:05:27 +0400 Subject: [PATCH 1/4] ci: use official Dart publishing --- .github/workflows/pub_publish.yml | 16 ++++++---------- .github/workflows/pub_publish_dry_run.yml | 20 +++++++++++++++----- 2 files changed, 21 insertions(+), 15 deletions(-) diff --git a/.github/workflows/pub_publish.yml b/.github/workflows/pub_publish.yml index 3a51984..130f8c1 100644 --- a/.github/workflows/pub_publish.yml +++ b/.github/workflows/pub_publish.yml @@ -1,17 +1,13 @@ name: Pub publish on: - release: - types: [published] + push: + tags: + - '[0-9]+.[0-9]+.[0-9]+*' jobs: publish: name: Pub publish - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v7 - - - name: Publish - uses: k-paxian/dart-package-publisher@v1.6 - with: - credentialJson: ${{ secrets.CREDENTIALS }} + permissions: + id-token: write + uses: dart-lang/setup-dart/.github/workflows/publish.yml@v1 diff --git a/.github/workflows/pub_publish_dry_run.yml b/.github/workflows/pub_publish_dry_run.yml index fd2dff7..ba095f7 100644 --- a/.github/workflows/pub_publish_dry_run.yml +++ b/.github/workflows/pub_publish_dry_run.yml @@ -11,10 +11,20 @@ jobs: name: Pub publish dry run runs-on: ubuntu-latest steps: - - uses: actions/checkout@v7 + - name: Checkout repository + uses: actions/checkout@v7 - - name: Publish dry run - uses: k-paxian/dart-package-publisher@v1.6 + - name: Install Flutter + uses: subosito/flutter-action@v2 with: - credentialJson: MockCredentialJson - dryRunOnly: true + channel: stable + cache: true + + - name: Disable analytics + run: flutter config --no-analytics + + - name: Flutter pub get + run: flutter pub get + + - name: Publish dry run + run: dart pub publish --dry-run From 84c31cc06e9b4507169d8719b981d27c98081174 Mon Sep 17 00:00:00 2001 From: Joachim Nohl <43643339+nohli@users.noreply.github.com> Date: Fri, 18 Sep 2026 06:48:34 +0400 Subject: [PATCH 2/4] Verify packages before publishing --- .github/workflows/pub_publish.yml | 23 +++++++++++++++++++++++ .github/workflows/pub_publish_dry_run.yml | 6 +++--- 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pub_publish.yml b/.github/workflows/pub_publish.yml index 130f8c1..fab7807 100644 --- a/.github/workflows/pub_publish.yml +++ b/.github/workflows/pub_publish.yml @@ -6,8 +6,31 @@ on: - '[0-9]+.[0-9]+.[0-9]+*' jobs: + verify: + name: Verify package + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v7 + + - name: Install Flutter + uses: subosito/flutter-action@v2 + with: + channel: stable + cache: true + + - name: Disable analytics + run: flutter config --no-analytics + + - name: Publish dry run + run: dart pub publish --dry-run + + - name: Flutter test + run: flutter test + publish: name: Pub publish + needs: verify permissions: id-token: write uses: dart-lang/setup-dart/.github/workflows/publish.yml@v1 diff --git a/.github/workflows/pub_publish_dry_run.yml b/.github/workflows/pub_publish_dry_run.yml index ba095f7..58ac4b6 100644 --- a/.github/workflows/pub_publish_dry_run.yml +++ b/.github/workflows/pub_publish_dry_run.yml @@ -23,8 +23,8 @@ jobs: - name: Disable analytics run: flutter config --no-analytics - - name: Flutter pub get - run: flutter pub get - - name: Publish dry run run: dart pub publish --dry-run + + - name: Flutter test + run: flutter test From bde515ca1cb2a041039b37ea5e415d4cbe54cea1 Mon Sep 17 00:00:00 2001 From: Joachim Nohl <43643339+nohli@users.noreply.github.com> Date: Fri, 18 Sep 2026 14:06:48 +0400 Subject: [PATCH 3/4] Correct publishing permissions and tag matching --- .github/workflows/pub_publish.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pub_publish.yml b/.github/workflows/pub_publish.yml index fab7807..5cd2bdd 100644 --- a/.github/workflows/pub_publish.yml +++ b/.github/workflows/pub_publish.yml @@ -3,7 +3,7 @@ name: Pub publish on: push: tags: - - '[0-9]+.[0-9]+.[0-9]+*' + - '[0-9]*.[0-9]*.[0-9]*' jobs: verify: @@ -32,5 +32,6 @@ jobs: name: Pub publish needs: verify permissions: + contents: read id-token: write uses: dart-lang/setup-dart/.github/workflows/publish.yml@v1 From 9b7eb93815a351307acd7c5f78f8cc196e3dc6e3 Mon Sep 17 00:00:00 2001 From: Joachim Nohl <43643339+nohli@users.noreply.github.com> Date: Thu, 24 Sep 2026 20:51:00 +0400 Subject: [PATCH 4/4] Use the documented release tag pattern --- .github/workflows/pub_publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pub_publish.yml b/.github/workflows/pub_publish.yml index 5cd2bdd..3b0aea4 100644 --- a/.github/workflows/pub_publish.yml +++ b/.github/workflows/pub_publish.yml @@ -3,7 +3,7 @@ name: Pub publish on: push: tags: - - '[0-9]*.[0-9]*.[0-9]*' + - '[0-9]+.[0-9]+.[0-9]+' jobs: verify: