Skip to content

added flutter setup in publish.yml #3

added flutter setup in publish.yml

added flutter setup in publish.yml #3

Workflow file for this run

name: Publish to pub.dev
on:
push:
tags:
# must align with the tag-pattern configured on pub.dev, often just replace
# with [0-9]+.[0-9]+.[0-9]+*
- 'v[0-9]+.[0-9]+.[0-9]+*' # tag-pattern on pub.dev: 'v'
# If you prefer tags like '1.2.3', without the 'v' prefix, then use:
# - '[0-9]+.[0-9]+.[0-9]+*' # tag-pattern on pub.dev: ''
# If your repository contains multiple packages consider a pattern like:
# - 'my_package_name-v[0-9]+.[0-9]+.[0-9]+*'
# Publish using the reusable workflow from dart-lang.
jobs:
publish:
permissions:
id-token: write # Required for authentication using OIDC
runs-on: ubuntu-latest
steps:
# Checkout repository
- uses: actions/checkout@v4
# Setup Flutter SDK
- uses: subosito/flutter-action@v1
with:
channel: 'stable'
# Setup Dart SDK with JWT token
- uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d
# Minimal package setup and dry run checks.
- name: Install dependencies
run: flutter pub get
- name: Publish - dry run
run: dart pub publish --dry-run
# Publishing...
- name: Publish to pub.dev
run: dart pub publish -f