Skip to content

Commit

Permalink
1
Browse files Browse the repository at this point in the history
  • Loading branch information
xishang0128 committed Feb 24, 2024
1 parent 6411dec commit b7ee352
Showing 1 changed file with 31 additions and 5 deletions.
36 changes: 31 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
# - { goos: linux, goarch: '386', output: '386' }
# - { goos: linux, goarch: amd64, output: amd64 }
- { goos: linux, goarch: amd64, goamd64: v3, output: amd64_v3 }
- { goos: linux, goarch: arm64, output: arm64 }
# - { goos: linux, goarch: arm64, output: arm64 }
# - { goos: linux, goarch: arm, goarm: '7', output: armv7 }
# - { goos: linux, goarch: mips, mips: hardfloat, output: mips-hardfloat }
# - { goos: linux, goarch: mips, mips: softfloat, output: mips-softfloat }
Expand Down Expand Up @@ -104,11 +104,37 @@ jobs:
gzip -c mihomo > mihomo-${GOOS}-${{matrix.jobs.output}}-${VERSION}.gz
fi
- name: Install FPM
run: sudo apt-get install ruby ruby-dev rubygems build-essential && sudo gem install --no-document fpm

- name: Create DEB package
run: fpm -s dir -t deb -n mihomo -v ${{ github.ref }} --description "mihomo" ./mihomo=/usr/local/bin/mihomo
if: ${{ matrix.jobs.goos == 'linux' }}
run: |
sudo apt-get install dpkg ruby ruby-dev rubygems build-essential && sudo gem install --no-document fpm
mkdir -p mihomo/DEBIAN
mkdir -p mihomo/usr/bin
mkdir -p mihomo/etc/mihomo
mkdir -p mihomo/usr/share/licenses/mihomo
cp mihomo mihomo/usr/bin/
cp LICENSE mihomo/usr/share/licenses/mihomo/
cat > mihomo/etc/mihomo/config.yaml <<EOF
mixed-port: 7890
external-controller: 127.0.0.1:9090
EOF
cat > ./mihomo/DEBIAN/control <<EOF
Package: mihomo
Version: ${VERSION}
Section:
Priority: extra
Architecture: ${{matrix.jobs.goarch}}
Maintainer: MetaCubeX <[email protected]>
Homepage: https://wiki.metacubex.one/
Description: The universal proxy platform.
EOF
dpkg-deb --build mihomo
- name: Save version
run: |
Expand Down

0 comments on commit b7ee352

Please sign in to comment.