Skip to content

Commit 887667d

Browse files
committed
删除内核 .tar.gz 格式文件;精简 sing-box 内核和 Android 安装包;修改发布时间的获取命令
1 parent 50faea0 commit 887667d

4 files changed

Lines changed: 66 additions & 319 deletions

File tree

‎.github/workflows/update-adguardhome.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ jobs:
2424
run: |
2525
echo "download_url=https://github.com/AdguardTeam/AdGuardHome/releases/download" >> ${GITHUB_ENV}
2626
echo "release_version=$(curl -sSL https://api.github.com/repos/AdguardTeam/AdGuardHome/releases/latest | jq -r '.tag_name')" >> ${GITHUB_ENV}
27-
echo "release_time=$(curl -sSL https://api.github.com/repos/AdguardTeam/AdGuardHome/releases/latest | jq -r '.created_at' | xargs -I {} date -d '{} +8 hours' '+%Y-%m-%d')" >> ${GITHUB_ENV}
27+
echo "release_time=$(curl -sSL https://api.github.com/repos/AdguardTeam/AdGuardHome/releases/latest | jq -r '.published_at // .created_at' | xargs -I {} date -d '{} +8 hours' '+%Y-%m-%d')" >> ${GITHUB_ENV}
2828
echo "beta_version=$(curl -sSL https://api.github.com/repos/AdguardTeam/AdGuardHome/releases | jq -r '[.[] | select(.tag_name | contains("b"))][0].tag_name')" >> ${GITHUB_ENV}
29-
echo "beta_time=$(curl -sSL https://api.github.com/repos/AdguardTeam/AdGuardHome/releases | jq -r '[.[] | select(.tag_name | contains("b"))][0].created_at' | xargs -I {} date -d '{} +8 hours' '+%Y-%m-%d')" >> ${GITHUB_ENV}
29+
echo "beta_time=$(curl -sSL https://api.github.com/repos/AdguardTeam/AdGuardHome/releases | jq -r '[.[] | select(.tag_name | contains("b"))][0] | (.published_at // .created_at)' | xargs -I {} date -d '{} +8 hours' '+%Y-%m-%d')" >> ${GITHUB_ENV}
3030
shell: bash
3131

3232
- name: Compare `AdGuard Home` versions with current release

‎.github/workflows/update-mihomo.yml‎

Lines changed: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ jobs:
2424
run: |
2525
echo "download_url=https://github.com/MetaCubeX/mihomo/releases/download" >> ${GITHUB_ENV}
2626
echo "meta_version=$(curl -sSL https://api.github.com/repos/MetaCubeX/mihomo/releases/latest | jq -r '.tag_name')" >> ${GITHUB_ENV}
27-
echo "meta_time=$(curl -sSL https://api.github.com/repos/MetaCubeX/mihomo/releases/latest | jq -r '.created_at' | xargs -I {} date -d '{} +8 hours' '+%Y-%m-%d')" >> ${GITHUB_ENV}
27+
echo "meta_time=$(curl -sSL https://api.github.com/repos/MetaCubeX/mihomo/releases/latest | jq -r '.published_at // .created_at' | xargs -I {} date -d '{} +8 hours' '+%Y-%m-%d')" >> ${GITHUB_ENV}
2828
echo "alpha_version=$(curl -sSL https://api.github.com/repos/MetaCubeX/mihomo/releases | jq -r '[.[] | select(.tag_name=="Prerelease-Alpha")][0].assets[].name' | perl -ne '/(alpha\-)([^.]+)/ && print "$1$2\n"' | head -n 1)" >> ${GITHUB_ENV}
29-
echo "alpha_time=$(curl -sSL https://api.github.com/repos/MetaCubeX/mihomo/releases | jq -r '[.[] | select(.tag_name=="Prerelease-Alpha")][0].created_at' | xargs -I {} date -d '{} +8 hours' '+%Y-%m-%d')" >> ${GITHUB_ENV}
29+
echo "alpha_time=$(curl -sSL https://api.github.com/repos/MetaCubeX/mihomo/releases | jq -r '[.[] | select(.tag_name=="Prerelease-Alpha")][0] | (.updated_at // .created_at)' | xargs -I {} date -d '{} +8 hours' '+%Y-%m-%d')" >> ${GITHUB_ENV}
3030
shell: bash
3131

3232
- name: Compare `mihomo` versions with current release
@@ -53,21 +53,16 @@ jobs:
5353
- name: Download `mihomo Meta` files
5454
if: ${{ env.mihomo_Meta_skip_update != 'true' }}
5555
run: |
56-
# Linux
57-
mkdir -p ./tmp-meta/ ./mihomo/
56+
# Linux (Ready for compress cores by `UPX`)
57+
mkdir -p ./mihomo/
5858
linux_archs=(amd64-v1 amd64-v3 armv5 armv6 armv7 arm64 mips-softfloat mipsle-softfloat mipsle-hardfloat)
5959
for i in "${!linux_archs[@]}"; do
60-
curl -L "${download_url}/${meta_version}/mihomo-linux-${linux_archs[i]}-${meta_version}.gz" | gunzip -c > ./tmp-meta/CrashCore
61-
# Compress cores by `tar.gz`
62-
chmod +x ./tmp-meta/CrashCore
63-
tar --no-same-owner -czf "./mihomo/mihomo-meta-linux-${linux_archs[i]}.tar.gz" -C ./tmp-meta/ CrashCore
64-
65-
# Ready for compress cores by `UPX`
66-
mv -f ./tmp-meta/CrashCore ./mihomo/mihomo-meta-linux-${linux_archs[i]}.upx
60+
curl -L "${download_url}/${meta_version}/mihomo-linux-${linux_archs[i]}-${meta_version}.gz" | gunzip -c > ./mihomo/mihomo-meta-linux-${linux_archs[i]}.upx
6761
chmod +x ./mihomo/mihomo-meta-linux-${linux_archs[i]}.upx
6862
done
6963
7064
# Windows
65+
mkdir -p ./tmp-meta/
7166
windows_archs=(amd64-v1 amd64-v3 arm64)
7267
for j in "${!windows_archs[@]}"; do
7368
mkdir -p "./tmp-meta/meta_windows_${windows_archs[j]}"
@@ -80,21 +75,16 @@ jobs:
8075
- name: Download `mihomo Alpha` files
8176
if: ${{ env.mihomo_Alpha_skip_update != 'true' }}
8277
run: |
83-
# Linux
84-
mkdir -p ./tmp-alpha/ ./mihomo/
78+
# Linux (Ready for compress cores by `UPX`)
79+
mkdir -p ./mihomo/
8580
linux_archs=(amd64-v1 amd64-v3 armv5 armv6 armv7 arm64 mips-softfloat mipsle-softfloat mipsle-hardfloat)
8681
for i in "${!linux_archs[@]}"; do
87-
curl -L "${download_url}/Prerelease-Alpha/mihomo-linux-${linux_archs[i]}-${alpha_version}.gz" | gunzip -c > ./tmp-alpha/CrashCore
88-
# Compress cores by `tar.gz`
89-
chmod +x ./tmp-alpha/CrashCore
90-
tar --no-same-owner -czf "./mihomo/mihomo-alpha-linux-${linux_archs[i]}.tar.gz" -C ./tmp-alpha/ CrashCore
91-
92-
# Ready for compress cores by `UPX`
93-
mv -f ./tmp-alpha/CrashCore ./mihomo/mihomo-alpha-linux-${linux_archs[i]}.upx
82+
curl -L "${download_url}/Prerelease-Alpha/mihomo-linux-${linux_archs[i]}-${alpha_version}.gz" | gunzip -c > ./mihomo/mihomo-alpha-linux-${linux_archs[i]}.upx
9483
chmod +x ./mihomo/mihomo-alpha-linux-${linux_archs[i]}.upx
9584
done
9685
9786
# Windows
87+
mkdir -p ./tmp-alpha/
9888
windows_archs=(amd64-v1 amd64-v3 arm64)
9989
for j in "${!windows_archs[@]}"; do
10090
mkdir -p "./tmp-alpha/alpha_windows_${windows_archs[j]}"

0 commit comments

Comments
 (0)