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 4b718a8 commit 641f66f
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,34 +97,34 @@ jobs:
CGO_ENABLED: ${{matrix.jobs.cgo}}
run: |
go build -v -tags "with_gvisor" -trimpath -ldflags "-extldflags --static -X 'github.com/metacubex/mihomo/constant.Version=${VERSION}' -X 'github.com/metacubex/mihomo/constant.BuildTime=${BUILDTIME}' -w -s -buildid="
if [ "${GOOS}" = "windows" ]; then
zip -r mihomo-${GOOS}-${{matrix.jobs.output}}-${VERSION}.zip mihomo.exe
if [ "${{matrix.jobs.goos}}" = "windows" ]; then
zip -r mihomo-${{matrix.jobs.goos}}-${{matrix.jobs.output}}-${VERSION}.zip mihomo.exe
else
# tar -czvf mihomo-${GOOS}-${{matrix.jobs.output}}-${VERSION}.tar.gz mihomo
gzip -c mihomo > mihomo-${GOOS}-${{matrix.jobs.output}}-${VERSION}.gz
# tar -czvf mihomo-${{matrix.jobs.goos}}-${{matrix.jobs.output}}-${VERSION}.tar.gz mihomo
gzip -c mihomo > mihomo-${{matrix.jobs.goos}}-${{matrix.jobs.output}}-${VERSION}.gz
fi
- name: Create DEB package
if: ${{ matrix.jobs.goos == 'linux' }}
run: |
sudo apt-get install dpkg
mkdir -p mihomo-${GOOS}-${{matrix.jobs.output}}-${VERSION}/DEBIAN
mkdir -p mihomo-${GOOS}-${{matrix.jobs.output}}-${VERSION}/usr/bin
mkdir -p mihomo-${GOOS}-${{matrix.jobs.output}}-${VERSION}/etc/mihomo
mkdir -p mihomo-${GOOS}-${{matrix.jobs.output}}-${VERSION}/etc/systemd/system/
mkdir -p mihomo-${GOOS}-${{matrix.jobs.output}}-${VERSION}/usr/share/licenses/mihomo
mkdir -p mihomo-${{matrix.jobs.goos}}-${{matrix.jobs.output}}-${VERSION}/DEBIAN
mkdir -p mihomo-${{matrix.jobs.goos}}-${{matrix.jobs.output}}-${VERSION}/usr/bin
mkdir -p mihomo-${{matrix.jobs.goos}}-${{matrix.jobs.output}}-${VERSION}/etc/mihomo
mkdir -p mihomo-${{matrix.jobs.goos}}-${{matrix.jobs.output}}-${VERSION}/etc/systemd/system/
mkdir -p mihomo-${{matrix.jobs.goos}}-${{matrix.jobs.output}}-${VERSION}/usr/share/licenses/mihomo
cp mihomo mihomo-${GOOS}-${{matrix.jobs.output}}-${VERSION}/usr/bin/mihomo
cp LICENSE mihomo-${GOOS}-${{matrix.jobs.output}}-${VERSION}/usr/share/licenses/mihomo/
cp .github/mihomo.service mihomo-${GOOS}-${{matrix.jobs.output}}-${VERSION}/etc/systemd/system/
cp mihomo mihomo-${{matrix.jobs.goos}}-${{matrix.jobs.output}}-${VERSION}/usr/bin/mihomo
cp LICENSE mihomo-${{matrix.jobs.goos}}-${{matrix.jobs.output}}-${VERSION}/usr/share/licenses/mihomo/
cp .github/mihomo.service mihomo-${{matrix.jobs.goos}}-${{matrix.jobs.output}}-${VERSION}/etc/systemd/system/
cat > mihomo-${GOOS}-${{matrix.jobs.output}}-${VERSION}/etc/mihomo/config.yaml <<EOF
cat > mihomo-${{matrix.jobs.goos}}-${{matrix.jobs.output}}-${VERSION}/etc/mihomo/config.yaml <<EOF
mixed-port: 7890
external-controller: 127.0.0.1:9090
EOF
cat > mihomo-${GOOS}-${{matrix.jobs.output}}-${VERSION}/DEBIAN/control <<EOF
cat > mihomo-${{matrix.jobs.goos}}-${{matrix.jobs.output}}-${VERSION}/DEBIAN/control <<EOF
Package: mihomo
Version: 1.18.2-alpha-${VERSION}
Section:
Expand Down

0 comments on commit 641f66f

Please sign in to comment.