92 lines
2.5 KiB
YAML
92 lines
2.5 KiB
YAML
name: Build Android (FCM)
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches:
|
|
- main
|
|
- master
|
|
paths:
|
|
- 'lib/**'
|
|
- 'android/**'
|
|
- 'pubspec.yaml'
|
|
- '.github/workflows/build-android-fcm.yml'
|
|
pull_request:
|
|
paths:
|
|
- 'lib/**'
|
|
- 'android/**'
|
|
- 'pubspec.yaml'
|
|
- '.github/workflows/build-android-fcm.yml'
|
|
|
|
jobs:
|
|
build-android-fcm:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Setup Java
|
|
uses: actions/setup-java@v3
|
|
with:
|
|
distribution: 'temurin'
|
|
java-version: '17'
|
|
- name: Setup Flutter
|
|
uses: subosito/flutter-action@v2
|
|
with:
|
|
flutter-version: '3.41.5'
|
|
channel: 'stable'
|
|
|
|
- name: Get dependencies
|
|
run: flutter pub get
|
|
|
|
- name: Configure Gradle
|
|
run: |
|
|
mkdir -p ~/.gradle
|
|
echo "org.gradle.jvmargs=-Xmx4096m -XX:MaxMetaspaceSize=1024m" >> ~/.gradle/gradle.properties
|
|
echo "kotlin.daemon.jvmargs=-Xmx1536m" >> ~/.gradle/gradle.properties
|
|
|
|
- name: Build Universal APK
|
|
run: flutter build apk --release --flavor oneme
|
|
|
|
- name: Build Split APKs
|
|
run: flutter build apk --release --split-per-abi --flavor oneme
|
|
|
|
- name: Upload Universal APK
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: komet-android-fcm-universal
|
|
path: build/app/outputs/flutter-apk/app-oneme-release.apk
|
|
retention-days: 30
|
|
|
|
- name: Upload arm64-v8a APK
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: komet-android-fcm-arm64-v8a
|
|
path: build/app/outputs/flutter-apk/app-oneme-arm64-v8a-release.apk
|
|
retention-days: 30
|
|
|
|
- name: Upload armeabi-v7a APK
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: komet-android-fcm-armeabi-v7a
|
|
path: build/app/outputs/flutter-apk/app-oneme-armeabi-v7a-release.apk
|
|
retention-days: 30
|
|
|
|
- name: Upload x86_64 APK
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: komet-android-fcm-x86_64
|
|
path: build/app/outputs/flutter-apk/app-oneme-x86_64-release.apk
|
|
retention-days: 30
|
|
|
|
- name: Build App Bundle
|
|
run: flutter build appbundle --release --flavor oneme
|
|
|
|
- name: Upload App Bundle artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: komet-android-fcm-aab
|
|
path: build/app/outputs/bundle/onemeRelease/app-oneme-release.aab
|
|
retention-days: 30
|