diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 11f09d6..24261cf 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -21,10 +21,10 @@ jobs: - name: Build run: | go mod tidy - GOOS=linux GOARCH=amd64 go build -o rdp-socks5-linux-gnu-amd64 -v ./... - GOOS=linux GOARCH=386 go build -o rdp-socks5-linux-gnu-386 -v ./... - GOOS=windows GOARCH=amd64 go build -o rdp-socks5-win64.exe -v ./... - GOOS=windows GOARCH=386 go build -o rdp-socks5-win32.exe -v ./... + CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -trimpath -ldflags="-extldflags=-static -s -w" -o rdp-socks5-linux-amd64 -v ./... + CGO_ENABLED=0 GOOS=linux GOARCH=386 go build -trimpath -ldflags="-extldflags=-static -s -w" -o rdp-socks5-linux-386 -v ./... + CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -trimpath -ldflags="-extldflags=-static -s -w" -o rdp-socks5-win64.exe -v ./... + CGO_ENABLED=0 GOOS=windows GOARCH=386 go build -trimpath -ldflags="-extldflags=-static -s -w" -o rdp-socks5-win32.exe -v ./... # Create release - name: Generate release tag