Skip to content

ci: add build-android action #1

ci: add build-android action

ci: add build-android action #1

Workflow file for this run

name: Flutter Build APK
on:
push:
branches:
- main # Change this to the branch you want to trigger the action
pull_request:
branches:
- main # Change this to the branch you want to trigger on PR
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up JDK
uses: actions/setup-java@v2
with:
java-version: '11' # Use the required Java version for your project
- name: Install Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: 'stable' # or a specific version, e.g., '3.10.5'
- name: Install dependencies
run: flutter pub get
- name: Build APK
run: flutter build apk --release # Add any additional flags you need
- name: Archive APK
uses: actions/upload-artifact@v3
with:
name: flutter-apk
path: build/app/outputs/flutter-apk/app-release.apk # Adjust this path if necessary