ci: update lint scripts

This commit is contained in:
Rongjian Zhang 2021-06-14 15:03:10 +08:00
parent 5b3bc45db5
commit b488b90f97
2 changed files with 9 additions and 27 deletions

View File

@ -1,22 +0,0 @@
name: deploy
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: subosito/flutter-action@v1
with:
channel: dev
- run: |
flutter config --enable-web
flutter pub get
flutter build web
- uses: peaceiris/actions-gh-pages@v3
with:
personal_token: ${{ secrets.PERSONAL_TOKEN }}
publish_dir: ./build/web/
external_repository: git-touch/git-touch.github.io

View File

@ -1,14 +1,18 @@
name: lint name: lint
on: on:
push: push:
branches: [main] branches:
- main
pull_request: pull_request:
branches: [main] branches:
- main
jobs: jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
container:
image: google/dart:latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- run: dartfmt --dry-run --set-exit-if-changed lib/*.dart lib/models/*.dart lib/scaffolds/*.dart lib/screens/*.dart lib/utils/*.dart lib/widgets/*.dart - uses: subosito/flutter-action@v1
with:
channel: stable
- run: flutter analyze
- run: flutter format --dry-run --set-exit-if-changed lib/**/*.dart