From bff9be897eba2e3920c24c30ed370d78159673fc Mon Sep 17 00:00:00 2001 From: Angelo Cassano Date: Wed, 21 Oct 2026 13:06:54 +0200 Subject: [PATCH] ci: publish through the pub.dev environment Pass the pub.dev environment to the publish workflow and grant the release and publish jobs the contents and id-token permissions they need. --- .github/workflows/default.yml | 4 ++++ .github/workflows/publish.yml | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/default.yml b/.github/workflows/default.yml index 988cbd5..8c503cd 100644 --- a/.github/workflows/default.yml +++ b/.github/workflows/default.yml @@ -61,6 +61,8 @@ jobs: working-directory: example release: + permissions: + contents: write needs: - build - checks @@ -69,6 +71,8 @@ jobs: uses: ./.github/workflows/release.yml publish: + permissions: + id-token: write needs: - release name: Publish diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index d4405de..0a8c2cb 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -8,4 +8,6 @@ jobs: if: startsWith(github.ref, 'refs/tags/') permissions: id-token: write - uses: dart-lang/setup-dart/.github/workflows/publish.yml@v1 \ No newline at end of file + uses: dart-lang/setup-dart/.github/workflows/publish.yml@v1 + with: + environment: pub.dev