diff --git a/.github/pkg.sh b/.github/pkg.sh new file mode 100644 index 000000000..2521a87a5 --- /dev/null +++ b/.github/pkg.sh @@ -0,0 +1,6 @@ +#!/bin/sh + +list=($(ls /mnt/bin/ | grep deb)) +for ((i = 0; i < ${#list[@]}; i++)); do + +done \ No newline at end of file diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0da9b0c16..ea29ad15b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -204,19 +204,6 @@ jobs: alien --to-rpm --scripts mihomo-${{matrix.jobs.goos}}-${{matrix.jobs.output}}-${VERSION}.deb mv mihomo*.rpm mihomo-${{matrix.jobs.goos}}-${{matrix.jobs.output}}-${VERSION}.rpm - - name: Convert DEB to PKG - if: ${{ matrix.jobs.goos == 'linux' && !contains(matrix.jobs.goarch, 'mips') && !contains(matrix.jobs.goarch, 'loong64') }} - run: | - docker pull archlinux - docker run --rm -v ./:/mnt archlinux bash -c " - pacman -Syu pkgfile base-devel --noconfirm - curl -L https://github.com/helixarch/debtap/raw/master/debtap > /usr/bin/debtap - chmod 755 /usr/bin/debtap - debtap -u - debtap -Q /mnt/mihomo-${{matrix.jobs.goos}}-${{matrix.jobs.output}}-${VERSION}.deb - " - mv mihomo*.pkg.tar.zst mihomo-${{matrix.jobs.goos}}-${{matrix.jobs.output}}-${VERSION}.pkg.tar.zst - - name: Save version run: | echo ${VERSION} > version.txt @@ -234,10 +221,39 @@ jobs: mihomo*.zip version.txt + Convert-PKG: + needs: [build] + runs-on: ubuntu-latest + steps: + - name: Download all workflow run artifacts + uses: actions/download-artifact@v4 + with: + path: bin/ + merge-multiple: true + + - name: Convert DEB to PKG + run: | + # docker pull archlinux + # docker run --rm -v ./:/mnt archlinux bash -c " + # pacman -Syu pkgfile base-devel --noconfirm + # curl -L https://github.com/helixarch/debtap/raw/master/debtap > /usr/bin/debtap + # chmod 755 /usr/bin/debtap + # debtap -u + + # " + ls + + - name: Archive production artifacts + uses: actions/upload-artifact@v4 + with: + name: archlinux-pkg + path: | + mihomo*.pkg.tar.zst + Upload-Prerelease: permissions: write-all if: ${{ github.ref_type == 'branch' && !startsWith(github.event_name, 'pull_request') }} - needs: [build] + needs: [Convert-PKG] runs-on: ubuntu-latest steps: - name: Download all workflow run artifacts @@ -288,7 +304,7 @@ jobs: Upload-Release: permissions: write-all if: ${{ github.ref_type=='tag' }} - needs: [build] + needs: [Convert-PKG] runs-on: ubuntu-latest steps: - name: Checkout