Skip to content

Commit 28e3cf3

Browse files
committedApr 15, 2023
~自动打包内核优化,并增加premium内核
1 parent b8cc237 commit 28e3cf3

File tree

3 files changed

+49
-8
lines changed

3 files changed

+49
-8
lines changed
 

‎.github/workflows/update_meta.alpha_core.yaml

-7
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,4 @@ jobs:
5353
prerelease: true
5454
files: |
5555
./tmp/*
56-
- name: Commit and push version
57-
run: |
58-
sed -i "s/meta.a_v=.*/meta.a_v=$(./tmp/clash-linux-amd64 -v 2>/dev/null | head -n 1 | sed 's/ linux.*//;s/.* //')/" bin/version
59-
rm -fr ./tmp
60-
git config --global user.email "juewuy@126.com" && git config --global user.name "Bot"
61-
git add . && git commit -m "更新Meta.Alpha内核至${download_version}" || exit 0
62-
git push
6356
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Update Premium latest Core
2+
on:
3+
schedule:
4+
- cron: "0 20 * * 1,3,5,6"
5+
workflow_dispatch:
6+
7+
env:
8+
download_version: latest
9+
download_url: https://release.dreamacro.workers.dev
10+
jobs:
11+
Update:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Clone Repository
15+
uses: actions/checkout@main
16+
- name: Init Dependencies
17+
run: |
18+
wget https://github.com/upx/upx/releases/download/v3.96/upx-3.96-amd64_linux.tar.xz
19+
wget https://github.com/upx/upx/releases/download/v3.93/upx-3.93-amd64_linux.tar.xz
20+
tar xf upx-3.96-amd64_linux.tar.xz
21+
tar xf upx-3.93-amd64_linux.tar.xz
22+
- name: Download Core
23+
run: |
24+
archs="386 amd64 armv5 armv7 arm64 mips-softfloat mipsle-hardfloat mipsle-softfloat"
25+
mkdir tmp
26+
for arch in ${archs};do
27+
wget "${download_url}/${download_version}/clash-linux-${arch}-${download_version}.gz" -O - | gunzip -c > ./tmp/clash-linux-${arch}
28+
chmod +x ./tmp/clash-linux-${arch}
29+
if [ "${arch}" != "armv5" ];then
30+
if [[ ${arch} == mips* ]];then
31+
./upx-3.93-amd64_linux/upx ./tmp/clash-linux-${arch}
32+
else
33+
./upx-3.96-amd64_linux/upx ./tmp/clash-linux-${arch}
34+
fi
35+
fi
36+
done
37+
mv -f ./tmp/clash-linux-arm64 ./tmp/clash-linux-armv8
38+
rm -fr upx*
39+
- name: Create Release and Upload Release Asset
40+
uses: softprops/action-gh-release@v1
41+
with:
42+
tag_name: clash.premium.latest
43+
name: clash.premium.latest
44+
body: "The latest version of clash.premium core \n这是clash.premium的最新版本内核文件\nhttps://github.com/Dreamacro/clash/releases/tag/premium \nZip by upx\n使用了upx进行压缩\nOnly support for ShellClash\n仅限于ShellClash项目使用"
45+
draft: false
46+
prerelease: true
47+
files: |
48+
./tmp/*
49+

‎bin/version

-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,5 @@ clashnet_v=v1.7.6
22
clashpre_v=2022.11.25
33
clash_v=v1.7.1
44
meta_v=v1.14.2
5-
meta.a_v=alpha-c2d1f71
65
GeoIP_v=20230408
76
versionsh=1.7.4f

0 commit comments

Comments
 (0)
Please sign in to comment.