diff --git a/.goreleaser.yml b/.goreleaser.yml index 822d4d2..24ed9a9 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -3,8 +3,6 @@ before: - go mod tidy -v builds: - id: nezha-agent - ldflags: - - -s -w env: - CGO_ENABLED=0 goos: @@ -17,7 +15,7 @@ builds: - 386 - amd64 - mips - - mips64 + #- mips64 gomips: - softfloat ignore: @@ -27,9 +25,15 @@ builds: goarch: arm64 main: ./cmd/agent binary: nezha-agent + # 为路由器、开发板缩小二进制体积 + asmflags: + - all=-trimpath={{.Env.GOPATH}} + gcflags: + - all=-trimpath={{.Env.GOPATH}} + ldflags: + - -s -w hooks: post: - # 为路由器、开发板缩小二进制体积 - upx --best "{{.Path}}" checksum: name_template: "checksums.txt"