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
1 changed files with 1 additions and 1 deletions

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