-
Notifications
You must be signed in to change notification settings - Fork 7
78 lines (69 loc) · 2.06 KB
/
jandroid.yaml
File metadata and controls
78 lines (69 loc) · 2.06 KB
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
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-22.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: "30.0.3"
- 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" }'