Updated the Java Version build action to v17 #3
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: Flutter | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./native-apps/urban-heat-notifier/urban_heat_notifier | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Java 17 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' # You can also use 'zulu', 'adopt', etc. | |
java-version: '17' | |
- name: Set up Flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
channel: 'stable' | |
- name: Install dependencies | |
run: flutter pub get | |
- name: Run tests | |
run: flutter test | |
- name: Build APK | |
run: flutter build apk --release | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: app-release.apk | |
path: build/app/outputs/flutter-apk/app-release.apk |