ci: Optimize published artifacts (#3118)

Build the published executables with CGO disabled, stripped, and with `-trimpath` for more reproducible build
This commit is contained in:
Matt Holt 2020-03-04 13:19:25 -07:00 committed by GitHub
parent 26fb8b3efd
commit 3f5d27cd5d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -100,7 +100,7 @@ jobs:
workingDirectory: '$(modulePath)'
displayName: Get dependencies
- bash: go build -v
- bash: CGO_ENABLED=0 go build -trimpath -a -ldflags="-w -s" -v
workingDirectory: '$(modulePath)/cmd/caddy'
displayName: Build Caddy