forked from GitJournal/GitJournal
-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (56 loc) · 1.99 KB
/
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
# SPDX-FileCopyrightText: 2019-2021 Vishesh Handa <[email protected]>
#
# SPDX-License-Identifier: Apache-2.0
name: Android
on:
push:
branches:
- master
workflow_dispatch:
jobs:
Build:
runs-on: ubuntu-latest
steps:
- name: Give more Disk Space
run: sudo rm -rf /usr/share/dotnet
- name: checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
path: "."
- name: Decode Keystore
id: decode_keystore
uses: timheuer/base64-to-file@v1
with:
fileName: 'secret/keystore.jks'
encodedString: ${{ secrets.AND_KEYSTORE }}
- name: setup keys
run: |
rm /home/runner/work/GitJournal/GitJournal/android/secrets/key.properties && cp $HOME/work/_temp/secret/keystore.jks /home/runner/work/GitJournal/GitJournal/android/secrets/ksk.jks && echo -e "storePassword=$KEY_PASSWORD\nkeyPassword=$KEY_PASSWORD\nkeyAlias=ksk\nstoreFile=../secrets/ksk.jks" >> "$GITHUB_WORKSPACE/android/secrets/key.properties" && cat $GITHUB_WORKSPACE/android/secrets/key.properties
env:
KEY_PASSWORD: ${{ secrets.AND_KEYPASS }}
- uses: actions/setup-java@v3
with:
distribution: "zulu"
java-version: "17"
- name: Get Flutter version from pubspec
run: |
set -e
FLUTTER_VERSION=$(cat pubspec.yaml | grep 'flutter:' | head -n 1 | awk '{ print $2 }' | tr -d '"' | cut -d "=" -f 2)
echo "FLUTTER_VERSION=${FLUTTER_VERSION}" >> $GITHUB_ENV
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
cache: true
- name: Flutter Doctor
run: flutter doctor
- name: Get Flutter Deps
run: flutter pub get --suppress-analytics
- name: Build
run: ./scripts/build_android.sh
- name: "Upload Artifact"
uses: actions/upload-artifact@v2
with:
name: APK
path: "*.apk"
if-no-files-found: error