66 lines
1.5 KiB
YAML
66 lines
1.5 KiB
YAML
name: Android Build
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
paths-ignore:
|
|
- '**.md'
|
|
pull_request:
|
|
branches: [main]
|
|
workflow_dispatch:
|
|
|
|
concurrency:
|
|
group: "android-${{ github.ref }}"
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Java
|
|
uses: actions/setup-java@v4
|
|
with:
|
|
distribution: 'temurin'
|
|
java-version: '17'
|
|
|
|
- name: Setup Flutter
|
|
uses: subosito/flutter-action@v2
|
|
with:
|
|
channel: stable
|
|
cache: true
|
|
|
|
- name: Install dependencies
|
|
run: flutter pub get
|
|
|
|
- name: Install SDK dependencies
|
|
run: cd packages/file_transfer_sdk && flutter pub get
|
|
|
|
- name: Enable Android platform
|
|
run: flutter config --enable-android
|
|
|
|
- name: Analyze code
|
|
run: flutter analyze
|
|
|
|
- name: Build Android APK
|
|
run: flutter build apk --release
|
|
|
|
- name: Build Android App Bundle
|
|
run: flutter build appbundle --release
|
|
|
|
- name: Upload APK artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: apk-release
|
|
path: build/app/outputs/flutter-apk/app-release.apk
|
|
retention-days: 30
|
|
|
|
- name: Upload App Bundle artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: appbundle-release
|
|
path: build/app/outputs/bundle/release/app-release.aab
|
|
retention-days: 30
|