Add github action for publish (#36) #8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish to pub.dev | ||
on: | ||
push: | ||
branches: | ||
- main | ||
tags: | ||
- '[0-9]+.[0-9]+.[0-9]+*' | ||
jobs: | ||
setup: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up Flutter SDK | ||
uses: subosito/flutter-action@v2 | ||
with: | ||
channel: stable | ||
version: 3.3.7 | ||
- name: Get dependencies | ||
run: flutter pub get | ||
publish: | ||
permissions: | ||
id-token: write # Required for authentication | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses:actions/checkout@v3 | ||
- uses: dart-lang/setup-dart@v1 | ||
- name: Install dependencies | ||
run: dart pub get | ||
- name: Publish | ||
run: dart pub publish --force |