Skip to content

github action

github action #27

Workflow file for this run

name: JANDROID
on:
push:
branches:
- '**'
# trigger workflow on file change
#on:
# push:
# paths:
# - 'version.txt'
# if: ${{ false }}
jobs:
# jandroid -------------------------------------------------------------
jandroid:
name: JANDROID
runs-on: ubuntu-20.04
steps:
- name: Checkout Git repository
uses: actions/checkout@v2
- name: Build JANDROID
run: |
wget https://raw.githubusercontent.com/jsoftware/jsource/master/version.txt
cd ~/
wget https://github.com/jsoftware/jsource/releases/download/build/androidlibs.zip
unzip androidlibs.zip
cd -
cp ~/libs/arm64-v8a/* libs/arm64-v8a/.
cp ~/libs/armeabi/* libs/armeabi/.
cp ~/libs/armeabi-v7a/* libs/armeabi-v7a/.
cp ~/libs/x86/* libs/x86/.
rm -rf assets/libexec
cp -r libs assets/libexec
find assets/libexec -type f -name '*.so' -delete
./gradlew build
./gradlew assemble
ls -ld /usr/local/lib/android/sdk/build-tools/*
- name: Sign apk
id: sign_apk
uses: r0adkll/sign-android-release@v1
with:
releaseDirectory: build/outputs/apk/release
signingKeyBase64: ${{ secrets.SIGNING_KEY }}
alias: ${{ secrets.SIGNING_KEY_ALIAS }}
keyStorePassword: ${{ secrets.SIGNING_STORE_PASSWORD }}
keyPassword: ${{ secrets.SIGNING_KEY_PASSWORD }}
env:
BUILD_TOOLS_VERSION: "34.0.0"
- name: Release
uses: ncipollo/release-action@v1
with:
tag: build
artifacts: "${{steps.sign_apk.outputs.signedReleaseFile}},AndroidManifest.xml,version.txt"
token: ${{ secrets.GITHUB_TOKEN }}
allowUpdates: true
replacesArtifacts: true
# webhook --------------------------------------------------------------
webhook:
name: Run Webhook
# remove the following line to run
if: ${{ false }}
runs-on: ubuntu-22.04
needs: jandroid
steps:
- name: update server
uses: distributhor/workflow-webhook@v2
env:
webhook_url: ${{ secrets.WEBHOOK_URL }}
webhook_secret: ${{ secrets.WEBHOOK_SECRET }}
data: '{ "id": "jandroid" }'