This commit is contained in:
juewuy
2023-04-28 19:59:56 +08:00
parent 96247a57da
commit 111c5725bc
7 changed files with 26 additions and 57 deletions

View File

@@ -105,4 +105,4 @@ jobs:
uses: Mattraks/delete-workflow-runs@main
with:
retain_days: 1
keep_minimum_runs: 3
keep_minimum_runs: 2

View File

@@ -48,4 +48,8 @@ jobs:
git config --global user.email "juewuy@gmail.com" && git config --global user.name "Bot"
git add . && git commit -m "更新Clash内核至${download_version}" || exit 0
git push
- name: Cleanup Workflow
uses: Mattraks/delete-workflow-runs@main
with:
retain_days: 1
keep_minimum_runs: 2

View File

@@ -1,51 +0,0 @@
name: Update DotNet Core
on:
workflow_dispatch:
inputs:
version:
description: 'version of Clash DotNet, such as v1.7.6'
required: true
type: string
env:
download_version: ${{ github.event.inputs.version }}
download_url: https://github.com/ClashDotNetFramework/experimental-clash/releases/download
jobs:
Update:
runs-on: ubuntu-latest
steps:
- name: Clone Repository
uses: actions/checkout@main
- name: Init Dependencies
run: |
wget https://github.com/upx/upx/releases/download/v3.96/upx-3.96-amd64_linux.tar.xz
wget https://github.com/upx/upx/releases/download/v3.93/upx-3.93-amd64_linux.tar.xz
tar xf upx-3.96-amd64_linux.tar.xz
tar xf upx-3.93-amd64_linux.tar.xz
- name: Download Core
run: |
archs="386 amd64 armv5 armv7 armv8 mips-softfloat mipsle-hardfloat mipsle-softfloat"
mkdir tmp
for arch in ${archs};do
wget "${download_url}/${download_version}/clash-linux-${arch}-${download_version}.gz" -O - | gunzip -c > ./tmp/clash-linux-${arch}
chmod +x ./tmp/clash-linux-${arch}
if [ "${arch}" != "armv5" ];then
if [[ ${arch} == mips* ]];then
./upx-3.93-amd64_linux/upx ./tmp/clash-linux-${arch}
else
./upx-3.96-amd64_linux/upx ./tmp/clash-linux-${arch}
fi
fi
done
rm -fr upx*
- name: Update
run: |
rm -fr ./bin/clash.net/*
cp ./tmp/* ./bin/clash.net/
rm -fr ./tmp
sed -i "s/clashnet_v=.*/clashnet_v=$(./bin/clash.net/clash-linux-amd64 -v 2>/dev/null | sed 's/ linux.*//;s/.* //')/" bin/version
- name: Commit and push
run: |
git config --global user.email "juewuy@gmail.com" && git config --global user.name "Bot"
git add . && git commit -m "更新DotNet内核至${download_version}" || exit 0
git push

View File

@@ -53,4 +53,8 @@ jobs:
prerelease: true
files: |
./tmp/*
- name: Cleanup Workflow
uses: Mattraks/delete-workflow-runs@main
with:
retain_days: 1
keep_minimum_runs: 2

View File

@@ -56,4 +56,8 @@ jobs:
git config --global user.email "juewuy@gmail.com" && git config --global user.name "Bot"
git add . && git commit -m "更新Meta内核至${download_version}" || exit 0
git push
- name: Cleanup Workflow
uses: Mattraks/delete-workflow-runs@main
with:
retain_days: 1
keep_minimum_runs: 2

View File

@@ -46,4 +46,8 @@ jobs:
prerelease: true
files: |
./tmp/*
- name: Cleanup Workflow
uses: Mattraks/delete-workflow-runs@main
with:
retain_days: 1
keep_minimum_runs: 2

View File

@@ -49,4 +49,8 @@ jobs:
git config --global user.email "juewuy@gmail.com" && git config --global user.name "Bot"
git add . && git commit -m "更新Premium内核至${download_version}" || exit 0
git push
- name: Cleanup Workflow
uses: Mattraks/delete-workflow-runs@main
with:
retain_days: 1
keep_minimum_runs: 2