Skip to content

Flutter Build Android Release #2

Flutter Build Android Release

Flutter Build Android Release #2

name: Flutter Build Android Release
on: workflow_dispatch
jobs:
build_android:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@v4
with:
repository: plum-tech/mimir-x
token: ${{ secrets.MIMIR_GITHUB_TOKEN }}
fetch-depth: 0
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9
- uses: actions/setup-node@v4
with:
node-version: 22
cache: 'pnpm'
cache-dependency-path: tools/pnpm-lock.yaml
- name: Pnpm install
run: |
cd tools && pnpm i && pnpm build && cd ..
- name: Install JDK 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- name: Install Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
cache: true
flutter-version-file: pubspec.yaml
- name: Build APK
run: |
flutter config --no-cli-animations
flutter build apk --target-platform android-arm,android-arm64 --split-per-abi
- name: Sign APK
uses: r0adkll/sign-android-release@v1
id: sign_apk
with:
releaseDirectory: build/app/outputs/flutter-apk
signingKeyBase64: ${{ secrets.APK_SIGN_JKS_BASE64 }}
keyStorePassword: ${{ secrets.APK_SIGN_JKS_PASSWORD }}
keyPassword: ${{ secrets.APK_SIGN_ALIAS_PASS }}
alias: ${{ secrets.APK_SIGN_ALIAS }}
env:
BUILD_TOOLS_VERSION: "34.0.0"
- name: Publish Android Artifact
uses: actions/upload-artifact@v4
with:
name: Android-release
path: build/app/outputs/flutter-apk/*-signed.apk