Skip to content

ci: build non release apk #6

ci: build non release apk

ci: build non release apk #6

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@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: '11' # Use the required Java version for your project
distribution: 'temurin' # Use the required JDK distribution for your project
- name: Install Flutter
id: flutter-action
uses: subosito/flutter-action@v2
with:
channel: stable
# https://github.com/subosito/flutter-action/discussions/197#discussioncomment-6431235
- run: git config --global --add safe.directory /opt/hostedtoolcache/flutter/${{ steps.flutter-action.outputs.CHANNEL }}-${{ steps.flutter-action.outputs.VERSION }}-${{ steps.flutter-action.outputs.ARCHITECTURE }}
- name: Install dependencies
run: flutter pub get
- name: Build APK
run: flutter build apk # Add any additional flags you need
- name: Archive APK
uses: actions/upload-artifact@v4
with:
name: flutter-apk
path: build/app/outputs/flutter-apk/app-release.apk # Adjust this path if necessary