Skip to content

Commit 08d8592

Browse files
HassamSheikhclaude
andcommitted
fix: trigger pub.dev publish on tag push instead of release event
The pub.dev OIDC authentication requires a push event to match the tag pattern. Release events are not supported. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent bd702c5 commit 08d8592

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

.github/workflows/publish.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
11
name: Auto-Publish to Pub.dev
22

33
on:
4-
release:
5-
types: [published]
4+
push:
5+
tags:
6+
- 'v[0-9]+.[0-9]+.[0-9]+*'
67

78
jobs:
89
publish:
910
permissions:
10-
id-token: write # Required for OIDC authentication
11+
id-token: write # Required for OIDC authentication with pub.dev
1112
runs-on: ubuntu-latest
1213
steps:
13-
- uses: actions/checkout@v3
14+
- uses: actions/checkout@v4
1415
- uses: dart-lang/setup-dart@v1
15-
16-
# This step handles the secure handshake between GitHub and pub.dev
17-
# You must configure your package as a "GitHub Actions Publisher" on pub.dev
16+
17+
- name: Install dependencies
18+
run: dart pub get
19+
1820
- name: Publish to pub.dev
1921
run: dart pub publish --force

0 commit comments

Comments
 (0)