name: Dart CI

on: [push]

jobs:
  build:

    runs-on: ubuntu-latest

    container:
      image:  google/dart:latest

    steps:
    - uses: actions/checkout@v1
    - name: Install dependencies
      run: pub get
    - name: Run tests
      run: pub run test
    - name: Publish Dart/Flutter package
      uses: sakebook/actions-flutter-pub-publisher@v1.2.1
      with:
        # Google Account credential
        credential: ${{ secrets.CREDENTIALS }}
        # (Optional) Publish packages type. (default: true)
        flutter_package: true # optional, default is true
        # (Optional) Skip test (default: false)
        skip_test: true # optional
        # (Optional) Package directory (default: ".")
        package_directory: . # optional, default is .
