Enable Flutter Builds on Linux and Windows #33
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
on: | |
pull_request: | |
branches: | |
- main | |
push: | |
branches: | |
- main | |
name: "MyHack Build & Release" | |
jobs: | |
build: | |
name: MyHack Build & Release | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [macos-latest, windows-latest, ubuntu-latest] | |
include: | |
- os: macos-latest | |
flutter_version: '3.13.9' | |
- os: windows-latest | |
flutter_version: '3.13.9' | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Setup Java | |
uses: actions/setup-java@v2 | |
with: | |
java-version: '12.x' | |
distribution: 'adopt' | |
- name: Setup Flutter | |
uses: subosito/flutter-action@v1 | |
with: | |
flutter-version: ${{ matrix.flutter_version }} | |
- name: Run Flutter Commands | |
run: | | |
cd app | |
flutter config --no-analytics | |
flutter pub get | |
flutter build apk --debug --split-per-abi | |
- name: Push to Releases | |
uses: ncipollo/release-action@v1 | |
with: | |
artifacts: "build/app/outputs/apk/debug/*" | |
tag: v1.0.${{ github.run_number }} | |
token: ${{ secrets.TOKEN }} |