-
-
Notifications
You must be signed in to change notification settings - Fork 12
37 lines (34 loc) · 1.25 KB
/
build_apk.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# This is quick action to build apk and share it with artifacts
# It's for convenience and nightly-testing with people
name: Build apk
on:
workflow_dispatch:
env:
flutter_channel: "any"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Parse fvm to set flutter version
run: echo "flutter_version=$(cat .fvm/fvm_config.json | jq -r .flutterSdkVersion)" >> $GITHUB_ENV
- name: Cache Flutter
uses: actions/cache@v3
with:
path: /opt/hostedtoolcache/flutter
key: ${{ runner.OS }}-flutter-install-cache-${{ env.flutter_version }}-${{ env.flutter_channel }}
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.flutter_version }}
channel: ${{ env.flutter_channel }}
- name: Build apk
run: flutter build apk --target-platform android-arm64
- name: Rename apk
# Clean branch name: https://stackoverflow.com/a/58034787
run: mv ./build/app/outputs/flutter-apk/app-release.apk ./freebuddy-nightly.apk
- name: Upload apk as artifact
uses: actions/upload-artifact@v3
with:
name: freebuddy-nightly
path: ./freebuddy-nightly.apk
if-no-files-found: error