-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
40 additions
and
0 deletions.
There are no files selected for viewing
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
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 | ||
|