Skip to content

fix: add dart setup step to publish pipeline #3

fix: add dart setup step to publish pipeline

fix: add dart setup step to publish pipeline #3

name: Publish to pub.dev on tag
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+*"
jobs:
publish:
runs-on: ubuntu-latest
# Required for publishing to pub.dev
permissions:
id-token: write
steps:
- uses: actions/checkout@v2
- uses: dart-lang/setup-dart@v1
- id: dotenv
uses: falti/[email protected]
with:
path: .github/workflows/.env
- uses: subosito/[email protected]
with:
flutter-version: ${{ steps.dotenv.outputs.flutter_version }}
channel: "stable"
cache: true
cache-key: flutter-macos-${{ steps.dotenv.outputs.flutter_version }}
cache-path: ${{ runner.tool_cache }}/flutter-${{ steps.dotenv.outputs.flutter_version }}
- name: Install Dependencies
run: flutter pub get
- name: Publish to pub.dev
run: flutter pub publish --force