Created
October 12, 2019 07:29
-
-
Save tianhaoz95/94021183a9c17b425df96681657c46c9 to your computer and use it in GitHub Desktop.
all in one check for flutter
This file contains hidden or 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: Checkin | |
on: [push, pull_request] | |
jobs: | |
lint-and-test: | |
name: Test on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest, macOS-latest] | |
steps: | |
- uses: actions/checkout@v1 | |
- uses: actions/setup-java@v1 | |
with: | |
java-version: '12.x' | |
- uses: subosito/flutter-action@v1 | |
with: | |
flutter-version: '1.9.1+hotfix.2' | |
channel: 'stable' | |
- name: Upgrade flutter | |
run: | | |
flutter channel master | |
flutter upgrade | |
- name: Install packages | |
run: | | |
cd ./rock_paper_scissors | |
flutter pub get | |
- name: Lint | |
run: | | |
cd ./rock_paper_scissors | |
flutter analyze | |
- name: Unit test | |
run: | | |
cd ./rock_paper_scissors | |
flutter test | |
build-Android: | |
name: Build Android apk | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- uses: actions/setup-java@v1 | |
with: | |
java-version: '12.x' | |
- uses: subosito/flutter-action@v1 | |
with: | |
flutter-version: '1.9.1+hotfix.4' | |
channel: 'stable' | |
- name: Upgrade flutter | |
run: | | |
flutter channel master | |
flutter upgrade | |
- name: Build apk package | |
run: | | |
cd ./rock_paper_scissors | |
flutter build apk --release | |
build-iOS: | |
name: Build iOS package | |
runs-on: macOS-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- uses: actions/setup-java@v1 | |
with: | |
java-version: '12.x' | |
- uses: subosito/flutter-action@v1 | |
with: | |
flutter-version: '1.9.1+hotfix.4' | |
channel: 'stable' | |
- name: Upgrade flutter | |
run: | | |
flutter channel master | |
flutter upgrade | |
- name: build iOS package | |
run: | | |
cd ./rock_paper_scissors | |
flutter build ios --release --no-codesign |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment