-
-
Notifications
You must be signed in to change notification settings - Fork 446
50 lines (41 loc) · 1.32 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
47
48
49
50
name: Nightly
on:
schedule:
# every night at midnight
- cron: '0 0 * * *'
jobs:
release:
runs-on: ubuntu-22.04
steps:
- name: checkout
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: 17
distribution: temurin
- name: Decrypt files
env:
KEYSTORE: ${{ secrets.keystore }}
SSH_KEY: ${{ secrets.ssh_key }}
run: |
echo "$KEYSTORE" | base64 -d > kiwix-android.keystore
echo "$SSH_KEY" | base64 -d > ssh_key
chmod 600 ssh_key
- name: build debug
env:
KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
KEY_STORE_PASSWORD: ${{ secrets.KEY_STORE_PASSWORD }}
run: ./gradlew assembleNightly
- name: Set date variable
run: echo "DATE=$(echo $(date +%Y-%m-%d))" >> $GITHUB_ENV
- name: release debug to kiwix.download.org
env:
UNIVERSAL_DEBUG_APK: app/build/outputs/apk/nightly/*universal*.apk
run: |
mkdir $DATE
cp $UNIVERSAL_DEBUG_APK $DATE
scp -P 30022 -vrp -i ssh_key -o StrictHostKeyChecking=no $DATE [email protected]:/data/download/nightly/