-
Notifications
You must be signed in to change notification settings - Fork 1
52 lines (42 loc) · 1.32 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: Android Flutter Build
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build:
name: Build Android
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup Java
uses: actions/setup-java@v2
with:
distribution: 'temurin' # AdoptOpenJDK
java-version: '11'
- name: Decode Keystore
run: |
echo "${{ secrets.STAGING_KEYSTORE_BASE64 }}" | base64 -d > android/key.jks
- name: Create Key Properties
run: |
echo "${{ secrets.STAGING_KEY_PROPERTIES }}" > android/key.properties
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: '3.19.3' # My current version of flutter
channel: 'stable'
cache: true
cache-key: 'flutter-:os:-:channel:-:version:-:arch:-:hash:'
cache-path: '${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:'
architecture: x64
- name: Get dependencies
run: flutter pub get
- name: Build APK
run: flutter build apk --release
- name: Archive artifacts
uses: actions/upload-artifact@v2
with:
name: app-release.apk
path: build/app/outputs/flutter-apk/app-release.apk