-
Notifications
You must be signed in to change notification settings - Fork 19
49 lines (40 loc) · 1.35 KB
/
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
name: Build launcher
on:
workflow_dispatch:
push:
branches: '*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Java JDK
uses: actions/setup-java@v4
with:
java-version: 21
distribution: temurin
cache: gradle
- name: Generate keystore file
run: echo ${{secrets.KEYSTORE_FILE}} | base64 -d > ~/release.keystore
- name: Fix gradle permissions
run: chmod +x ./gradlew
- name: Build project
run: |
./gradlew app:assembleDebug \
-Pandroid.injected.signing.store.file="$HOME/release.keystore" \
-Pandroid.injected.signing.store.password="${{secrets.KEYSTORE_PASSWORD}}" \
-Pandroid.injected.signing.key.alias="${{secrets.KEY_ALIAS}}" \
-Pandroid.injected.signing.key.password="${{secrets.KEY_PASSWORD}}"
- name: Rename apk
id: rename_apk
run: |
SHORT_SHA=${GITHUB_SHA::7}
APK_PATH=${{github.workspace}}/app/build/outputs/apk/debug/app-debug.apk
OUT_PATH=${{github.workspace}}/geode-launcher-debug-$SHORT_SHA.apk
mv $APK_PATH $OUT_PATH
echo "path=$OUT_PATH" >> $GITHUB_OUTPUT
- name: Upload development build
uses: actions/upload-artifact@v3
with:
name: geode-launcher-debug
path: ${{ steps.rename_apk.outputs.path }}