diff --git a/.github/workflows/update_meta_core.yaml b/.github/workflows/update_meta_core.yaml index cdca176c..d5a960f0 100644 --- a/.github/workflows/update_meta_core.yaml +++ b/.github/workflows/update_meta_core.yaml @@ -64,8 +64,8 @@ jobs: runs-on: ubuntu-latest needs: go env: - REPO: ${{ github.event.inputs.tag1 }} - TAGS: ${{ github.event.inputs.tag5 }} + REPO: ${{ inputs.tag1 }} + TAGS: ${{ inputs.tag5 }} outputs: version: ${{steps.meta.outputs.version}} tags: ${{steps.meta.outputs.tags}} @@ -74,7 +74,7 @@ jobs: - name: get meta version id: meta run: | - version=${{ github.event.inputs.tag2 }} + version=${{ inputs.tag2 }} [ "$version" = Alpha ] && version="Alpha-$(date +"%Y%m%d")" echo version=$version >> $GITHUB_OUTPUT if [ -z "$TAGS" ];then @@ -137,8 +137,8 @@ jobs: - name: Checkout meta uses: actions/checkout@v5 with: - repository: ${{ github.event.inputs.tag1 }} - ref: ${{ github.event.inputs.tag2 }} + repository: ${{ inputs.tag1 }} + ref: ${{ inputs.tag2 }} fetch-depth: 1 - name: Setup Go @@ -188,11 +188,11 @@ jobs: - name: Zip core by upx if: env.ZIPTYPE == '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.94/upx-3.94-amd64_linux.tar.xz - tar xf upx-3.96-amd64_linux.tar.xz - tar xf upx-3.94-amd64_linux.tar.xz + run: | + for upxv in 3.94 3.96 5.1.0;do + wget https://github.com/upx/upx/releases/download/v$upxv/upx-$upxv-amd64_linux.tar.xz + tar xf upx-$upxv-amd64_linux.tar.xz + done for arch in amd64 armv5 armv7 arm64 386 mips-softfloat mipsle-hardfloat mipsle-softfloat;do [ ! -f ./tmp/linux-${arch}/meta ] && continue mv -f ./tmp/linux-${arch}/meta ./tmp/clash-linux-${arch}.upx @@ -201,12 +201,15 @@ jobs: armv5|mips* ) ./upx-3.94-amd64_linux/upx --no-lzma ./tmp/clash-linux-${arch}.upx ;; - *) + armv7|386) ./upx-3.96-amd64_linux/upx --no-lzma ./tmp/clash-linux-${arch}.upx ;; + *) + ./upx-5.1.0-amd64_linux/upx ./tmp/clash-linux-${arch}.upx + ;; esac done - rm -rf upx-3.9* + rm -rf upx-* - name: Zip core by tar if: env.ZIPTYPE == 'tar.gz' @@ -250,9 +253,9 @@ jobs: if: ${{ env.RELEASE != '' && env.PUSHDIR == '' }} uses: softprops/action-gh-release@v1 with: - tag_name: ${{ github.event.inputs.tag3 }} - name: ${{ 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 \nOnly support for ShellCrash\n仅适配ShellCrash项目" + tag_name: ${{ inputs.tag3 }} + name: ${{ inputs.tag3 }} + body: "The ${{env.VERSION}} version of ${{ inputs.tag1 }} \n这是${{ inputs.tag1 }}的${{env.VERSION}}版本内核文件\nhttps://github.com/${{ inputs.tag1 }}/releases \nOnly support for ShellCrash\n仅适配ShellCrash项目" draft: false prerelease: true files: | diff --git a/.github/workflows/update_singbox_core.yaml b/.github/workflows/update_singbox_core.yaml index 06e90836..11177278 100644 --- a/.github/workflows/update_singbox_core.yaml +++ b/.github/workflows/update_singbox_core.yaml @@ -208,24 +208,27 @@ jobs: - name: Zip core by upx if: env.ZIPTYPE == '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.94/upx-3.94-amd64_linux.tar.xz - tar xf upx-3.96-amd64_linux.tar.xz - tar xf upx-3.94-amd64_linux.tar.xz + for upxv in 3.94 3.96 5.1.0;do + wget https://github.com/upx/upx/releases/download/v$upxv/upx-$upxv-amd64_linux.tar.xz + tar xf upx-$upxv-amd64_linux.tar.xz + done for arch in amd64 armv5 armv7 arm64 386 mips-softfloat mipsle-hardfloat mipsle-softfloat;do [ ! -f ./tmp/linux-${arch}/sing-box ] && continue mv -f ./tmp/linux-${arch}/sing-box ./tmp/singbox-linux-${arch}.upx chmod +x ./tmp/singbox-linux-${arch}.upx case "${arch}" in armv5|mips* ) - ./upx-3.94-amd64_linux/upx --no-lzma ./tmp/singbox-linux-${arch}.upx + ./upx-3.94-amd64_linux/upx --no-lzma ./tmp/clash-linux-${arch}.upx + ;; + armv7|386) + ./upx-3.96-amd64_linux/upx --no-lzma ./tmp/clash-linux-${arch}.upx ;; *) - ./upx-3.96-amd64_linux/upx --no-lzma ./tmp/singbox-linux-${arch}.upx + ./upx-5.1.0-amd64_linux/upx ./tmp/clash-linux-${arch}.upx ;; esac done - rm -rf upx-3.9* + rm -rf upx-* - name: Zip core by tar if: env.ZIPTYPE == 'tar.gz'