feat: add build workflow #3
Workflow file for this run
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: Build | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup Dart SDK | |
uses: dart-lang/setup-dart@v1 | |
with: | |
sdk: stable | |
- name: Install dependencies | |
run: dart pub get | |
- name: Check format | |
run: dart format --set-exit-if-changed lib/ | |
- name: Analyze code | |
run: dart analyze lib/ | |
- name: Setup Flutter | |
uses: subosito/flutter-action@v1 | |
with: | |
channel: 'stable' | |
- name: Build example app | |
run: | | |
cd example/ | |
flutter pub get | |
flutter build web --release |