Nightly #1817
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/ |