Skip to content

build_android

build_android #3

Workflow file for this run

name: "build_android"
on:
workflow_dispatch:
jobs:
build_android:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
- name: Set up signing files
env:
APK_SIGN_PWD: "${{ secrets.APK_SIGN_PWD }}"
APK_SIGN_ALIAS: "${{ secrets.APK_SIGN_ALIAS }}"
APK_SIGN_JKS: "${{ secrets.APK_SIGN_JKS }}"
run: |
chmod a+x tools/generate_jks_linux_amd64
tools/generate_jks_linux_amd64
- name: Replace key
env:
SOME_SECRET_KEY: ${{ secrets.SOME_SECRET_KEY }}
SOME_REPLACE_KEY: ${{ secrets.SOME_REPLACE_KEY }}
SOME_REPLACE_FILE: ${{ secrets.SOME_REPLACE_FILE }}
run: |
chmod a+x tools/key_replace_linux_amd64
tools/key_replace_linux_amd64
- name: Clone repository
uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- uses: actions/setup-java@v4
with:
distribution: 'oracle'
java-version: '17'
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
- run: flutter build apk --release
- run: flutter build apk --release --split-per-abi
- name: Rename Apks
run: |
mv build/app/outputs/flutter-apk/app-release.apk build/app/outputs/flutter-apk/AppRhyme_android_unknown.apk
mv build/app/outputs/flutter-apk/app-armeabi-v7a-release.apk build/app/outputs/flutter-apk/AppRhyme_android_armeabi-v7a.apk
mv build/app/outputs/flutter-apk/app-arm64-v8a-release.apk build/app/outputs/flutter-apk/AppRhyme_android_arm64-v8a.apk
mv build/app/outputs/flutter-apk/app-x86_64-release.apk build/app/outputs/flutter-apk/AppRhyme_android_x86_64.apk
- name: Upload Apk (unknown)
uses: actions/upload-artifact@v4
with:
name: AppRhyme_android_unknown
path: build/app/outputs/flutter-apk/AppRhyme_android_unknown.apk
compression-level: 9
- name: Upload Apk (armeabi-v7a)
uses: actions/upload-artifact@v4
with:
name: AppRhyme_android_armeabi-v7a
path: build/app/outputs/flutter-apk/AppRhyme_android_armeabi-v7a.apk
compression-level: 9
- name: Upload Apk (arm64-v8a)
uses: actions/upload-artifact@v4
with:
name: AppRhyme_android_arm64-v8a
path: build/app/outputs/flutter-apk/AppRhyme_android_arm64-v8a.apk
compression-level: 9
- name: Upload Apk (x86_64)
uses: actions/upload-artifact@v4
with:
name: AppRhyme_android_x86_64
path: build/app/outputs/flutter-apk/AppRhyme_android_x86_64.apk
compression-level: 9