Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
xishang0128 committed Mar 8, 2024
1 parent 43f4f31 commit d582576
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 15 deletions.
6 changes: 6 additions & 0 deletions .github/pkg.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/sh

list=($(ls /mnt/bin/ | grep deb))
for ((i = 0; i < ${#list[@]}; i++)); do

done
46 changes: 31 additions & 15 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit d582576

Please sign in to comment.