Skip to content

Commit

Permalink
ci: add build-android action
Browse files Browse the repository at this point in the history
  • Loading branch information
felixerdy committed Sep 25, 2024
1 parent 7db3c12 commit 66dfdf7
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/build-android.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
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

0 comments on commit 66dfdf7

Please sign in to comment.