-
-
Notifications
You must be signed in to change notification settings - Fork 22
55 lines (43 loc) · 1.36 KB
/
android-build.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
53
54
55
name: Android Build
on:
pull_request:
branches:
- "*"
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
permissions: write-all
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: "17"
cache: 'gradle'
- uses: subosito/flutter-action@v2
with:
flutter-version: "3.19.3"
channel: 'stable'
cache: true
- name: Create key.properties
run: |
echo keyPassword=\${{ secrets.KEY_PASSWORD }} > ./android/key.properties
echo storePassword=\${{ secrets.KEY_STORE_PASSWORD }} >> ./android/key.properties
echo keyAlias=\${{ secrets.KEY_ALIAS }} >> ./android/key.properties
- name: Load key
run: echo "${{ secrets.KEYSTORE_JKS_RELEASE }}" | base64 --decode > android/app/release-key.jks
- name: Turn off analytics
run: flutter config --no-analytics
- name: Pub Get Packages
run: flutter pub get
- name: Build APK
run: flutter build apk --release --split-per-abi --flavor dev
- name: Save APKs to Artifacts
uses: actions/upload-artifact@v4
with:
name: APKs
path: build/app/outputs/flutter-apk/*.apk
retention-days: 3