-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
80 additions
and
30 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
name: build | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- main | ||
pull_request: | ||
branches: | ||
- master | ||
- main | ||
|
||
jobs: | ||
format-check: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: subosito/flutter-action@v2 | ||
with: | ||
channel: 'stable' | ||
|
||
- name: Check | ||
run: | | ||
flutter pub get | ||
dart fix | ||
dart format . | ||
git diff --exit-code | ||
if [ $? -eq 0 ]; then | ||
echo "No formatting changes detected" | ||
else | ||
echo "Formatting changes detected. Run `make format` to fix it." | ||
exit 1 | ||
fi | ||
build-windows: | ||
runs-on: windows-latest | ||
needs: format-check | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: subosito/flutter-action@v2 | ||
with: | ||
channel: 'stable' | ||
|
||
- name: Build | ||
run: | | ||
flutter config --enable-windows-desktop | ||
flutter build windows | ||
build-web: | ||
runs-on: ubuntu-latest | ||
needs: format-check | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: subosito/flutter-action@v2 | ||
with: | ||
channel: 'stable' | ||
|
||
- name: Build | ||
run: | | ||
flutter pub get | ||
flutter build web | ||
build-android: | ||
runs-on: ubuntu-latest | ||
needs: format-check | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-java@v2 | ||
with: | ||
distribution: 'zulu' | ||
java-version: '11' | ||
- uses: subosito/flutter-action@v2 | ||
with: | ||
channel: 'stable' | ||
|
||
- name: Build | ||
run: | | ||
flutter pub get | ||
flutter build apk |
This file was deleted.
Oops, something went wrong.