Skip to content

Build AppFlowy Android #3

Build AppFlowy Android

Build AppFlowy Android #3

Workflow file for this run

name: Build AppFlowy Android
on:
workflow_dispatch:
inputs:
repo:
description: "Repo"
required: true
default: "AppFlowy-IO/AppFlowy"
ref:
description: "Branch, Tag or Commit"
required: true
default: "main"
build_name:
description: "Build Version (it should match the version in pubspec.yaml)"
required: true
default: "0.4.3"
build_number:
description: 'Build Number (it should be unique)'
required: true
default: "2904300"
build_type:
type: choice
description: 'Build Type'
required: true
options:
- 'apk'
- 'appbundle'
server_type:
type: choice
description: 'Server Type (1 for local, 2 for cloud)'
required: true
default: '2'
options:
- 1
- 2
server_url:
description: 'Server URL'
required: true
default: 'https://beta.appflowy.cloud'
env:
FLUTTER_VERSION: "3.18.0-0.2.pre"
RUST_TOOLCHAIN: "1.75"
jobs:
build:
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest]
include:
- os: ubuntu-latest
target: aarch64-linux-android
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/build_android
with:
repo: ${{ github.event.inputs.repo }}
ref: ${{ github.event.inputs.ref }}
build_name: ${{ github.event.inputs.build_name }}
build_number: ${{ github.event.inputs.build_number }}
build_type: ${{ github.event.inputs.build_type }}
server_type: ${{ github.event.inputs.server_type }}
server_url: ${{ github.event.inputs.server_url }}
- name: Rename APK
if: github.event.inputs.build_type == 'apk'
run: |
mv frontend/appflowy_flutter/build/app/outputs/flutter-apk/app-arm64-v8a-release.apk frontend/appflowy_flutter/build/app/outputs/flutter-apk/AppFlowy.apk
shell: bash
- name: Upload APK
if: github.event.inputs.build_type == 'apk'
uses: actions/upload-artifact@v2
with:
name: AppFlowy-${{ github.event.inputs.build_name }}.apk
path: frontend/appflowy_flutter/build/app/outputs/flutter-apk/AppFlowy.apk
- name: Rename AAB
if: github.event.inputs.build_type == 'appbundle'
run: |
mv frontend/appflowy_flutter/build/app/outputs/bundle/release/app-release.aab frontend/appflowy_flutter/build/app/outputs/bundle/release/AppFlowy.aab
shell: bash
- name: Upload AAB
if: github.event.inputs.build_type == 'appbundle'
uses: actions/upload-artifact@v2
with:
name: AppFlowy-${{ github.event.inputs.build_name }}.aab
path: frontend/appflowy_flutter/build/app/outputs/bundle/release/AppFlowy.aab