-
Notifications
You must be signed in to change notification settings - Fork 0
82 lines (67 loc) · 2.32 KB
/
build-launcher.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
72
73
74
75
76
77
78
79
80
81
82
name: Build launcher
on:
pull_request:
branches: ["main"]
workflow_dispatch:
inputs:
branch:
description: libaura branch name
required: true
default: 'main'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Add submodule private key
uses: webfactory/ssh-agent@v0.7.0
with:
ssh-private-key: |
${{secrets.SUBMODULE_SSH_KEY}}
- name: Fetch submodules
run: git submodule update --init --recursive --remote
- name: Checkout input libaura branch
working-directory: ${{github.workspace}}/app/src/main/cpp/libaurav2/
run: git checkout ${{github.event.inputs.branch}}
if: github.event_name == 'workflow_dispatch' && github.event.inputs.branch != 'main'
- uses: awalsh128/cache-apt-pkgs-action@v1
with:
packages: libncurses5
version: 1.0
- name: Setup Java JDK
uses: actions/setup-java@v3.9.0
with:
java-version: 19
distribution: temurin
cache: gradle
- name: Load CPM cache
id: cache-cpm
uses: actions/cache@v3
with:
path: ~/cpm-cache
key: ${{ runner.os }}-cpm-${{ hashFiles('**/') }}
restore-keys: |
${{ runner.os }}-cpm-
- name: Generate keystore file
run: echo ${{secrets.KEYSTORE_FILE}} | base64 -d > ~/release.keystore
- name: Generate keystore properties
run: |
touch ${{github.workspace}}/app/signing.properties
echo "storeFile=$HOME/release.keystore
storePassword=${{secrets.KEYSTORE_PASSWORD}}
keyAlias=${{secrets.KEY_ALIAS}}
keyPassword=${{secrets.KEY_PASSWORD}}" > ${{github.workspace}}/app/signing.properties
- name: Fix gradle permissions
run: chmod +x ./gradlew
- name: Build project
run: ./gradlew assembleLauncherRelease assembleLauncherDevelopment
env:
CPM_SOURCE_CACHE: ~/cpm-cache
- name: Generate output date
id: date
run: echo "date=$(date +'%y%m%d')" >> $GITHUB_OUTPUT
- name: Upload development build
uses: actions/upload-artifact@v3
with:
name: ${{steps.date.outputs.date}}-gdps-launcher-dev-${{github.sha}}.apk
path: ${{github.workspace}}/app/build/outputs/apk/launcher/development/app-launcher-development.apk