-
-
Notifications
You must be signed in to change notification settings - Fork 74
46 lines (38 loc) · 1.37 KB
/
nightly.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
name: Nightly
on:
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Generate changelog
run: |
echo "## Changelog" >> $GITHUB_STEP_SUMMARY
sh ./scripts/list-nightly-commits.sh >> $GITHUB_STEP_SUMMARY
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: 17
- name: Make gradlew executable
run: chmod +x ./gradlew
- name: Build APK
run: |
echo ${NIGHTLY_STORE_FILE} | base64 -d > KEY_NIGHTLY.jks
NIGHTLY_KEY_ALIAS=$(echo -n $NIGHTLY_KEY_ALIAS | base64 -d)
./gradlew assembleNightly -Dnightly_store_file=../KEY_NIGHTLY.jks -Dnightly_store_password="${NIGHTLY_STORE_PASSWORD}" -Dnightly_key_alias="${NIGHTLY_KEY_ALIAS}" -Dnightly_key_password="${NIGHTLY_STORE_PASSWORD}"
env:
NIGHTLY_STORE_PASSWORD: ${{ secrets.NIGHTLY_STORE_PASSWORD }}
NIGHTLY_KEY_ALIAS: ${{ secrets.NIGHTLY_KEY_ALIAS }}
NIGHTLY_STORE_FILE: ${{ secrets.NIGHTLY_STORE_FILE }}
- name: Upload APK
uses: actions/upload-artifact@v3
with:
name: Trail-Sense-Nightly.apk
path: ./app/build/outputs/apk/nightly/*.apk
retention-days: 7