Skip to content

fix: manually set up java to build for android #117

fix: manually set up java to build for android

fix: manually set up java to build for android #117

# Based on https://medium.com/flutter-community/automating-publishing-your-flutter-apps-to-google-play-using-github-actions-2f67ac582032
name: Flutter release
on:
push:
branches:
- main
release:
types: [published]
jobs:
release:
name: Build and Release
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v4
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
cache: true
# optional parameters follow
cache-key: "flutter-:os:-:channel:-:version:-:arch:-:hash:" # optional, change this to force refresh cache
cache-path: "${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:" # optional, change this to specify the cache path
pub-cache-key: "flutter-pub:os:-:channel:-:version:-:arch:-:hash:" # optional, change this to force refresh cache of dart pub get dependencies
pub-cache-path: "${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:" # optional, change this to specify the cache path
- run: flutter --version
- run: flutter pub get
- run: flutter build apk --debug --flavor core
- run: flutter build appbundle --flavor core
- name: Upload build artifacts
uses: actions/upload-artifact@v2
with:
name: app-release-bundle
path: |
build/app/outputs/bundle/coreRelease/app-core-release.aab
build/app/outputs/flutter-apk/app-core-release.apk