Skip to content

Update dart.yml

Update dart.yml #18

Workflow file for this run

name: Dart 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 Dart
uses: dart-lang/setup-dart@v1
with:
sdk: stable
- name: Install dependencies
run: dart pub get
- name: Run tests
run: dart test
- name: Publish to pub.dev (dry run)
env:
PUB_DEV_TOKEN: ${{ secrets.PUB_DEV_TOKEN }}
run: dart pub publish --dry-run
- name: Publish to pub.dev
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
env:
PUB_DEV_TOKEN: ${{ secrets.PUB_DEV_TOKEN }}
run: dart pub publish --force