-
Notifications
You must be signed in to change notification settings - Fork 2
92 lines (78 loc) · 2.58 KB
/
android.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
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
name: Android CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: '0'
fetch-tags: 'true'
submodules: 'recursive'
- name: Pull & update submodules recursively
run: |
git submodule update --init --recursive
git submodule update --recursive --remote
- name: Set up Go
uses: actions/setup-go@v5
with:
check-latest: true
go-version-file: 'yuhaiin/code/go.mod'
cache-dependency-path: 'yuhaiin/code/go.sum'
- name: clone
run: |
cd yuhaiin/code/internal/http
git clone --depth=1 https://github.com/yuhaiin/yuhaiin.github.io.git out
rm -rf out/.git out/.nojekyll
go run -v compress.go
echo ${PWD}
ls
- name: download rule
run: |
cd yuhaiin/code/internal/statics
curl https://raw.githubusercontent.com/yuhaiin/yuhaiin/ACL/yuhaiin/yuhaiin.conf -o bypass.conf
go run generate.go
echo ${PWD}
ls
- name: set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: gradle
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: init gomobile
run: |
go install golang.org/x/mobile/cmd/gomobile@latest
gomobile init
- name: build yuhaiin aar
run: sh yuhaiin/build.sh
- name: Build with Gradle
run: |
export KEYSTORE_PATH=${PWD}/release.keystore
export KEY_ALIAS=${{ secrets.KEY_ALIAS }}
export KEYSTORE_PASSWORD=${{ secrets.KEYSTORE_PASSWORD }}
export KEY_PASSWORD=${{ secrets.KEY_PASSWORD }}
echo ${KEYSTORE_PATH}
echo ${{ secrets.KEYSTORE_BASE64 }} | base64 -d > ${KEYSTORE_PATH}
./gradlew app:assembleRelease --stacktrace
- name: upload_arm64-v8a
uses: actions/upload-artifact@v4
with:
name: app-arm64-v8a-release
path: app/build/outputs/apk/release/yuhaiin-arm64-v8a-release.apk
- name: upload_x86_64
uses: actions/upload-artifact@v4
with:
name: app-x86_64-release
path: app/build/outputs/apk/release/yuhaiin-x86_64-release.apk
- name: metadata.json
uses: actions/upload-artifact@v4
with:
name: metadata.json
path: app/build/outputs/apk/release/output-metadata.json