Nightly #3
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@v3 | |
with: | |
fetch-depth: 1 | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: 11 | |
distribution: temurin | |
- name: build debug | |
run: ./gradlew assembleNightly | |
- name: Decrypt files | |
env: | |
ssh_key: ${{ secrets.ssh_key }} | |
run: | | |
echo "$ssh_key" | base64 -d > ssh_key | |
chmod 600 ssh_key | |
- 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/ |