-
-
Notifications
You must be signed in to change notification settings - Fork 144
93 lines (79 loc) · 2.62 KB
/
build.yaml
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
name: Build
on:
workflow_dispatch:
inputs:
Alpha:
description: 'Alpha'
required: true
default: 'true'
Premium:
description: 'Premium'
required: true
default: 'false'
Foss:
description: 'Foss'
required: true
default: 'false'
jobs:
build:
name: "Build APKs"
runs-on: ubuntu-latest
defaults:
run:
working-directory: source
permissions:
contents: write
timeout-minutes: 60
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Validate gradle wrapper
uses: gradle/wrapper-validation-action@v1
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 17
- name: Setup gradle
uses: gradle/gradle-build-action@v2
- name: Setup gradlew
run: chmod +x gradlew
- name: Check build-logic
run: ./gradlew check -p build-logic
- name: Decode store file
env:
STORE_FILE: ${{ secrets.STORE_FILE }}
ENCODED_STRING: ${{ secrets.STORE_BASE64 }}
run: echo $ENCODED_STRING | base64 -di > "./app/${STORE_FILE}"
- name: Build with gradle
id: gradle
env:
STORE_FILE: ${{ secrets.STORE_FILE }}
STORE_PASSWORD: ${{ secrets.STORE_PASSWORD }}
KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
BUILD_ALPHA: ${{ github.event.inputs.Alpha }}
BUILD_PREMIUM: ${{ github.event.inputs.Premium }}
BUILD_FOSS: ${{ github.event.inputs.Foss }}
run: |
TASKS=""
if [ ${BUILD_ALPHA} = 'true' ]; then
TASKS="$TASKS assembleArm64-v8aAlphaRelease assembleArmeabi-v7aAlphaRelease assembleX86AlphaRelease assembleX86_64AlphaRelease"
fi
if [ ${BUILD_PREMIUM} = 'true' ]; then
TASKS="$TASKS assembleArm64-v8aPremiumRelease assembleArmeabi-v7aPremiumRelease assembleX86PremiumRelease assembleX86_64PremiumRelease"
fi
if [ ${BUILD_FOSS} = 'true' ]; then
TASKS="$TASKS assembleArm64-v8aFossRelease assembleArmeabi-v7aFossRelease assembleX86FossRelease assembleX86_64FossRelease"
fi
if [ -z ${TASKS} ]; then
TASKS="assembleRelease"
fi
./gradlew $TASKS --daemon --parallel
- name: Move APKs
run: mv ./*/build/outputs/apk/*/release/*.apk .
- name: Upload APKs
uses: actions/upload-artifact@v4
with:
name: APKs
path: '**/*.apk'