-
-
Notifications
You must be signed in to change notification settings - Fork 2
71 lines (59 loc) · 2.14 KB
/
build-android.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: Build Android
on:
# Enable manual run
workflow_dispatch:
# Allow being called by other workflows
workflow_call:
inputs:
pre-release:
description: "Whether the build is for a pre-release"
required: false
default: false
type: boolean
env:
app-display-name: "Unit Bargain Hunter"
author: "Merritt Codes"
identifier: "codes.merritt.bargain"
jobs:
build-android:
name: Build Android
runs-on: ubuntu-latest
# ----------------------------------- Setup ------------------------------ #
steps:
- name: Setup Flutter
uses: subosito/flutter-action@v2.3.0
- name: Install Android dependencies
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '17'
- name: Checkout code
uses: actions/checkout@v3
- name: Configure Keystore for Android
run: |
echo "$PLAY_STORE_UPLOAD_KEY" | base64 --decode > app/upload-keystore.jks
echo "storeFile=upload-keystore.jks" >> key.properties
echo "keyAlias=$KEYSTORE_KEY_ALIAS" >> key.properties
echo "storePassword=$KEYSTORE_STORE_PASSWORD" >> key.properties
echo "keyPassword=$KEYSTORE_KEY_PASSWORD" >> key.properties
env:
PLAY_STORE_UPLOAD_KEY: ${{ secrets.PLAY_STORE_UPLOAD_KEY }}
KEYSTORE_KEY_ALIAS: ${{ secrets.KEYSTORE_KEY_ALIAS }}
KEYSTORE_KEY_PASSWORD: ${{ secrets.KEYSTORE_KEY_PASSWORD }}
KEYSTORE_STORE_PASSWORD: ${{ secrets.KEYSTORE_STORE_PASSWORD }}
working-directory: android
- name: Prepare for build
run: |
flutter upgrade
flutter pub get
# ----------------------------------- Build ---------------------------- #
- name: Run build script
env:
GITHUB_TOKEN: ${{ secrets.RELEASES_TOKEN }}
run: flutter pub run flutter_app_builder -v --platforms=android
# ---------------------------------- Upload ---------------------------- #
- name: Upload artifacts to workflow
uses: actions/upload-artifact@v3
with:
name: android-artifacts
path: output/*