cd: support self-contained releases (#169)

This commit is contained in:
xvzc 2024-08-21 01:42:47 +09:00 committed by xvzc
parent 73e5fec093
commit 0a2dc1a7e9
3 changed files with 1 additions and 19 deletions

View File

@ -41,6 +41,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAG_NAME: ${{ needs.draft_release.outputs.tag_name }}
CGO_ENABLED: 0
steps:
- uses: actions/checkout@v4
- name: Setup Go

8
build
View File

@ -1,8 +0,0 @@
#!/bin/sh
docker run --rm \
-it \
--workdir /app/out \
-v ./:/app \
golang:1.21-alpine \
sh /app/make-releases.sh

View File

@ -1,11 +0,0 @@
#!/bin/bash
for osarch in 'darwin/amd64' 'darwin/arm64' 'linux/amd64' 'linux/arm' 'linux/arm64' 'linux/mips' 'linux/mipsle' ; do
GOOS=${osarch%/*} GOARCH=${osarch#*/} go build -ldflags="-w -s" github.com/xvzc/SpoofDPI/cmd/spoof-dpi &&
tar -zcvf spoof-dpi-${osarch%/*}-${osarch#*/}.tar.gz ./spoof-dpi &&
rm -rf ./spoof-dpi
done
for osarch in 'windows/amd64'; do
GOOS=${osarch%/*} GOARCH=${osarch#*/} go build -o spoof-dpi-${osarch%/*}-${osarch#*/}.exe -ldflags="-w -s" github.com/xvzc/SpoofDPI/cmd/spoof-dpi
done