Skip to content

0120

0120 #77

Workflow file for this run

name: Commit
on: [push]
env:
CI_NAME: Commit CI
jobs:
build:
if: "!contains(github.event.head_commit.message, 'wip')"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: gradle
- name: Setup keystore
run: |
echo ${{ secrets.SIGNING_KEY }} | base64 --decode | cat >> $(pwd)/signingkey.jks
cat << EOF > keystore.properties
storeFile=$(pwd)/signingkey.jks
storePassword=${{ secrets.KEY_STORE_PASSWORD }}
keyAlias=${{ secrets.ALIAS }}
keyPassword=${{ secrets.KEY_PASSWORD }}
EOF
- name: Create DB
run: |
pushd tools
python3 -m pip install -r requirements.txt
touch tables/*.py
python3 make.py -c
popd
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew build
- name: Create latest release
uses: 'marvinpinto/action-automatic-releases@latest'
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
automatic_release_tag: latest
prerelease: true
title: "Lastest Build"
files: |
app/build/outputs/apk/release/*.APK
tools/warnings.txt
- name: Deploy to SF
run: |
sshpass -p '${{ secrets.SF_PASSWORD }}' scp -o StrictHostKeyChecking=no cgi/cgi-bin/*.* ${{ secrets.SF_USERNAME }}@web.sourceforge.net:/home/project-web/mcpdict/cgi-bin
sshpass -p '${{ secrets.SF_PASSWORD }}' scp -o StrictHostKeyChecking=no tools/warnings.txt app/build/reports/lint-results-debug.html ${{ secrets.SF_USERNAME }}@web.sourceforge.net:/home/project-web/mcpdict/htdocs