Skip to content

Publish to pub.dev

Publish to pub.dev #6

Workflow file for this run

name: Publish to pub.dev
on:
workflow_run:
workflows: ["Publish GitHub Release"]
types:
- completed
permissions:
contents: read
id-token: write
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: "3.29.0"
channel: 'stable'
cache: true
- name: Install dependencies
run: flutter pub get
- name: Authenticate with pub.dev
run: echo "${{ secrets.TOKEN }}" | dart pub token add https://pub.dev
- name: Verify package
run: flutter pub publish --dry-run
- name: Publish to pub.dev
run: flutter pub publish