forked from bunny-mod/BunnyXposed
-
Notifications
You must be signed in to change notification settings - Fork 2
53 lines (40 loc) · 1.76 KB
/
build.yml
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
name: Build APK
on: [push]
jobs:
build:
name: Build and push
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: "temurin"
java-version: "17"
- name: "Setup Gradle"
uses: gradle/gradle-build-action@v2
- name: "Grant execution permission"
run: chmod +x ./gradlew
- name: "Build APKs"
run: ./gradlew build
- name: "Setup directories"
run: |
mkdir -p /tmp/pyonbuild/apks
mkdir -p /tmp/pyonbuild/tools
- name: "Move debug APK"
run: mv ./app/build/outputs/apk/debug/app-debug.apk /tmp/pyonbuild/apks
- name: "Download uber-apk-signer"
run: wget -nv "https://github.com/patrickfav/uber-apk-signer/releases/download/v1.2.1/uber-apk-signer-1.2.1.jar" -O /tmp/pyonbuild/tools/uber-apk-signer.jar
- name: "Sign release APK"
run: java -jar /tmp/pyonbuild/tools/uber-apk-signer.jar --apks ./app/build/outputs/apk/release/app-release-unsigned.apk --out /tmp/pyonbuild/apks/
- name: "Rename release APK"
run: mv /tmp/pyonbuild/apks/app-release-aligned-debugSigned.apk /tmp/pyonbuild/apks/app-release.apk
- name: "Upload debug APK"
uses: actions/upload-artifact@v3
with:
name: app-debug
path: /tmp/pyonbuild/apks/app-debug.apk
- name: "Upload release APK"
uses: actions/upload-artifact@v3
with:
name: app-release
path: /tmp/pyonbuild/apks/app-release.apk