Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -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