forked from CatVodTVOfficial/CatVodTVSpider
-
Notifications
You must be signed in to change notification settings - Fork 23
67 lines (55 loc) · 2.97 KB
/
spider_basic.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
name: Spider basic
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: set up JDK
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'adopt'
- name: Clone project
run: |
rm -rf project
rm -rf jar/custom_spider.jar
git clone -b main --recurse-submodules https://github.com/zhixc/CatVodTVSpider project
- name: Customize Spider
working-directory: ./project
run: |
#删除克隆后的项目app/src/main/java/com/github/catvod/spider下后缀为.java的文件
find app/src/main/java/com/github/catvod/spider -type f -name "*.java" -delete
# Init.java、Proxy.java、PushAgent.java 必须有
curl -L https://github.com/zhixc/CatVodTVSpider/raw/main/app/src/main/java/com/github/catvod/spider/Init.java > app/src/main/java/com/github/catvod/spider/Init.java
curl -L https://github.com/zhixc/CatVodTVSpider/raw/main/app/src/main/java/com/github/catvod/spider/Proxy.java > app/src/main/java/com/github/catvod/spider/Proxy.java
curl -L https://github.com/zhixc/CatVodTVSpider/raw/main/app/src/main/java/com/github/catvod/spider/PushAgent.java > app/src/main/java/com/github/catvod/spider/PushAgent.java
# 本地文件视频播放
curl -L https://github.com/zhixc/CatVodTVSpider/raw/main/app/src/main/java/com/github/catvod/spider/LocalFileV2.java > app/src/main/java/com/github/catvod/spider/LocalFileV2.java
# 直播转点播
curl -L https://github.com/zhixc/CatVodTVSpider/raw/main/app/src/main/java/com/github/catvod/spider/Live2Vod.java > app/src/main/java/com/github/catvod/spider/Live2Vod.java
- name: Build the app
working-directory: ./project
run: |
chmod +x gradlew
./gradlew assemblerelease --build-cache --parallel --daemon --warning-mode all
- name: Customize Spider Jar
working-directory: ./project
run: |
rm -rf jar/custom_spider.jar
rm -rf jar/spider.jar/original/META-INF
curl -L https://github.com/iBotPeaches/Apktool/releases/download/v2.7.0/apktool_2.7.0.jar > jar/3rd/apktool_2.7.0.jar
java -jar jar/3rd/baksmali-2.5.2.jar d app/build/intermediates/dex/release/minifyReleaseWithR8/classes.dex -o jar/Smali_classes
mkdir -p jar/spider.jar/smali/com/github/catvod/
mv jar/Smali_classes/com/github/catvod/spider jar/spider.jar/smali/com/github/catvod/
mv jar/Smali_classes/com/github/catvod/parser jar/spider.jar/smali/com/github/catvod/
java -jar jar/3rd/apktool_2.7.0.jar b jar/spider.jar -c
mv jar/spider.jar/dist/dex.jar ../jar/custom_spider.jar
md5=($(md5sum ../jar/custom_spider.jar))
echo $md5 > ../jar/custom_spider.jar.md5
- name: Upload APK
uses: actions/upload-artifact@v4
with:
name: Spider
path: ./jar/custom_spider.jar