Skip to content

Update dart.yml

Update dart.yml #20

Workflow file for this run

name: Flutter Package
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: 'stable'
- name: Install dependencies
run: flutter pub get
- name: Run tests
run: flutter test
- name: Publish to pub.dev (dry run)
env:
PUB_DEV_TOKEN: ${{ secrets.PUBDEV_TOKEN }}
run: flutter pub publish --dry-run
- name: Publish to pub.dev
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
env:
PUB_DEV_TOKEN: ${{ secrets.PUBDEV_TOKEN }}
run: flutter pub publish --force