修改内核压缩方式
This commit is contained in:
81
.github/workflows/update_singbox_core_test.yaml
vendored
81
.github/workflows/update_singbox_core_test.yaml
vendored
@@ -77,32 +77,32 @@ jobs:
|
|||||||
goos: linux
|
goos: linux
|
||||||
goarch: amd64
|
goarch: amd64
|
||||||
goamd64: v1
|
goamd64: v1
|
||||||
- name: linux-386
|
# - name: linux-386
|
||||||
goos: linux
|
# goos: linux
|
||||||
goarch: 386
|
# goarch: 386
|
||||||
- name: linux-arm64
|
# - name: linux-arm64
|
||||||
goos: linux
|
# goos: linux
|
||||||
goarch: arm64
|
# goarch: arm64
|
||||||
- name: linux-armv5
|
# - name: linux-armv5
|
||||||
goos: linux
|
# goos: linux
|
||||||
goarch: arm
|
# goarch: arm
|
||||||
goarm: 5
|
# goarm: 5
|
||||||
- name: linux-armv7
|
# - name: linux-armv7
|
||||||
goos: linux
|
# goos: linux
|
||||||
goarch: arm
|
# goarch: arm
|
||||||
goarm: 7
|
# goarm: 7
|
||||||
- name: linux-mips-softfloat
|
# - name: linux-mips-softfloat
|
||||||
goos: linux
|
# goos: linux
|
||||||
goarch: mips
|
# goarch: mips
|
||||||
gomips: softfloat
|
# gomips: softfloat
|
||||||
- name: linux-mipsel-softfloat
|
# - name: linux-mipsel-softfloat
|
||||||
goos: linux
|
# goos: linux
|
||||||
goarch: mipsle
|
# goarch: mipsle
|
||||||
gomips: softfloat
|
# gomips: softfloat
|
||||||
- name: linux-mipsel-hardfloat
|
# - name: linux-mipsel-hardfloat
|
||||||
goos: linux
|
# goos: linux
|
||||||
goarch: mipsle
|
# goarch: mipsle
|
||||||
gomips: hardfloat
|
# gomips: hardfloat
|
||||||
|
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -148,36 +148,19 @@ jobs:
|
|||||||
RELEASE: ${{ github.event.inputs.tag3 }}
|
RELEASE: ${{ github.event.inputs.tag3 }}
|
||||||
VERSION: ${{needs.sing-box.outputs.version}}
|
VERSION: ${{needs.sing-box.outputs.version}}
|
||||||
steps:
|
steps:
|
||||||
- name: Get upx
|
|
||||||
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 file from workspace
|
- name: Download file from workspace
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
path: ./tmp
|
path: ./tmp
|
||||||
|
|
||||||
- name: Zip core by upx
|
- name: Zip core by tar
|
||||||
run: |
|
run: |
|
||||||
archs=(amd64 armv5 armv7 arm64 mips-softfloat mipsel-hardfloat mipsel-softfloat)
|
for arch in amd64 ;do #armv5 armv7 arm64 mips-softfloat mipsel-hardfloat mipsel-softfloat
|
||||||
new_name=(amd64 armv5 armv7 armv8 mips-softfloat mipsle-hardfloat mipsle-softfloat)
|
mv -f ./tmp/linux-${archs}/sing-box ./tmp/singbox-linux-${archs}
|
||||||
for((i=0;i<7;i++));do
|
chmod +x ./tmp/singbox-linux-${archs}
|
||||||
mv -f ./tmp/linux-${archs[i]}/sing-box ./tmp/singbox-linux-${new_name[i]}
|
tar -zcvf ./tmp/singbox-linux-${archs}.tar.gz ./tmp/singbox-linux-${archs}
|
||||||
chmod +x ./tmp/singbox-linux-${new_name[i]}
|
|
||||||
if [ "${archs[i]}" != "armv5" ];then
|
|
||||||
if [[ ${archs[i]} = mips* ]];then
|
|
||||||
./upx-3.93-amd64_linux/upx ./tmp/singbox-linux-${new_name[i]}
|
|
||||||
else
|
|
||||||
./upx-3.96-amd64_linux/upx ./tmp/singbox-linux-${new_name[i]}
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
done
|
done
|
||||||
rm -fr upx*
|
|
||||||
rm -fr ./tmp/core.tar.gz
|
rm -fr ./tmp/core.tar.gz
|
||||||
echo ${VERSION} > ./tmp/version
|
|
||||||
|
|
||||||
- name: Create Release and Upload Release Asset
|
- name: Create Release and Upload Release Asset
|
||||||
if: ${{ env.RELEASE != '0' }}
|
if: ${{ env.RELEASE != '0' }}
|
||||||
@@ -185,7 +168,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
tag_name: singbox_core${{ github.event.inputs.tag3 }}
|
tag_name: singbox_core${{ github.event.inputs.tag3 }}
|
||||||
name: singbox_core${{ github.event.inputs.tag3 }}
|
name: singbox_core${{ github.event.inputs.tag3 }}
|
||||||
body: "The ${{env.VERSION}} version of ${{ github.event.inputs.tag1 }} \n这是${{ github.event.inputs.tag1 }}的${{env.VERSION}}版本内核文件\nhttps://github.com/${{ github.event.inputs.tag1 }}/releases \nZip by upx\n使用了upx进行压缩\nOnly support for ShellCrash\n仅限于ShellCrash项目使用"
|
body: "The ${{env.VERSION}} version of ${{ github.event.inputs.tag1 }} \n这是${{ github.event.inputs.tag1 }}的${{env.VERSION}}版本内核文件\nhttps://github.com/${{ github.event.inputs.tag1 }}/releases \nOnly support for ShellCrash\n仅适配ShellCrash项目使用"
|
||||||
draft: false
|
draft: false
|
||||||
prerelease: true
|
prerelease: true
|
||||||
files: |
|
files: |
|
||||||
|
|||||||
Reference in New Issue
Block a user