-
Notifications
You must be signed in to change notification settings - Fork 10
133 lines (116 loc) · 5.62 KB
/
default.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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
name: Release
run-name: Patch QQ
# 控制工作流何时运行
on:
schedule:
- cron: '30 1 * * 4'
# Runs at 01:30, only on Thursday.
# Actions schedules run at most every 5 minutes using UTC time.
# “肯德基疯狂星期四”仅限9:30-23:00供应
# 上海市、广东省、福建省、海南省、广西壮族自治区等部分地区仅限10:30-23:00供应,具体以餐厅实际营业时间为准。
# https://docs.github.com/zh/actions/using-workflows/events-that-trigger-workflows#repository_dispatch
repository_dispatch:
types: [release]
# 仅供测试:每次提交时运行工作流
push:
branches: [ "main" ]
# 允许手动运行工作流
workflow_dispatch:
# 新增Star时立即运行
# 注意:此项不应长期保持开启!
# watch:
# types: [started]
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'temurin' # See 'Supported distributions' for available options
java-version: '17'
- name: Download Custom QQ 下载自定义版本QQ
# 官方直链:https://downv6.qq.com/qqweb/QQ_1/android_apk/Android_8.9.58_64_HB2.apk
run: gh release download -O QQ-8.9.58.apk --repo Hakuin123/MQGA READY --pattern QQ_8.9.58_64_HB2.apk
- name: Download Latest QQ 下载最新版QQ
run: |
response=$(curl -s -X POST -H "Content-Type: application/json" -d '{"packagename":"com.tencent.mobileqq"}' https://upage.html5.qq.com/wechat-apkinfo)
response=$(echo "$response" | tr -cd '[:print:]')
version_name=$(echo "$response" | jq -r '.app_detail_records."com.tencent.mobileqq".apk_all_data.version_name')
download_url=$(echo "$response" | jq -r '.app_detail_records."com.tencent.mobileqq".apk_all_data.url')
echo "获取到最新版本号: $version_name"
echo "直链下载地址: $download_url"
wget -nv -U "Mozilla/5.0" -O "QQ-$version_name-latest.apk" $download_url
# 下载LSPatch
- name: Download LSPatch 下载LSPatch
run: gh release download -O LSPatch.jar --repo LSPosed/LSPatch --pattern '*.jar'
# 下载模块
- name: Download Modules 下载模块
run: |
gh release download -O QAuxiliary.apk --repo cinit/QAuxiliary --pattern '*arm64.apk'
gh release download -O XAutoDaily.apk --repo LuckyPray/XAutoDaily --pattern '*.apk'
gh release download -O TSBattery.apk --repo fankes/TSBattery --pattern '*.apk'
gh release download -O QQCleaner.apk --repo KitsunePie/QQCleaner --pattern '*.apk'
# 开始修补QQ
- name: Patch QQ 修补各版本QQ
run: java -jar LSPatch.jar QQ-*.apk -m QAuxiliary.apk,XAutoDaily.apk,TSBattery.apk,QQCleaner.apk -l 2
# 获取模块版本信息
- id: QAuxiliary
uses: pozetroninc/[email protected]
with:
repository: cinit/QAuxiliary
excludes: prerelease, draft
token: ${{ secrets.GITHUB_TOKEN }}
- id: XAutoDaily
uses: pozetroninc/[email protected]
with:
repository: LuckyPray/XAutoDaily
excludes: prerelease, draft
token: ${{ secrets.GITHUB_TOKEN }}
- id: TSBattery
uses: pozetroninc/[email protected]
with:
repository: fankes/TSBattery
excludes: prerelease, draft
token: ${{ secrets.GITHUB_TOKEN }}
- id: QQCleaner
uses: pozetroninc/[email protected]
with:
repository: KitsunePie/QQCleaner
excludes: prerelease, draft
token: ${{ secrets.GITHUB_TOKEN }}
- id: LSPatch
uses: pozetroninc/[email protected]
with:
repository: LSPosed/LSPatch
excludes: prerelease, draft
token: ${{ secrets.GITHUB_TOKEN }}
# 发布Release
- name: Draft Release 发布Release
uses: softprops/action-gh-release@v1
with:
files: |
*-lspatched.apk
tag_name: ${{ github.run_id }} # 存储库中每个工作流运行的唯一编号
name: QQ Releases ${{ github.run_number }} # 仓库中特定工作流程每个运行的唯一编号(从 1 开始递增)。
body: |
仅在此发布最新修补的Release版本,标有“latest”的是基于最新版本QQ修补的版本。
### 本次打包使用的模块
| 模块名称 | 模块版本 | 查看项目 |
| ------- | -------- | ------- |
| QAuxiliary | ${{ steps.QAuxiliary.outputs.release }} | [点击跳转](https://github.com/cinit/QAuxiliary) |
| XAutoDaily | ${{ steps.XAutoDaily.outputs.release }} | [点击跳转](https://github.com/LuckyPray/XAutoDaily) |
| TSBattery | ${{ steps.TSBattery.outputs.release }} | [点击跳转](https://github.com/fankes/TSBattery) |
| QQCleaner | ${{ steps.QQCleaner.outputs.release }} | [点击跳转](https://github.com/KitsunePie/QQCleaner) |
<details><summary>点击展开模块更新详情</summary>
#### QAuxiliary
${{ steps.QAuxiliary.outputs.description }}
#### XAutoDaily
${{ steps.XAutoDaily.outputs.description }}
#### TSBattery
${{ steps.TSBattery.outputs.description }}
#### QQCleaner
${{ steps.QQCleaner.outputs.description }}
#### [LSPatch](https://github.com/LSPosed/LSPatch)版本:${{ steps.LSPatch.outputs.release }}