add: goreleaser
This commit is contained in:
@@ -46,20 +46,17 @@ tasks:
|
||||
platforms: [windows]
|
||||
- cmd: rm -f *.syso
|
||||
platforms: [linux, darwin]
|
||||
- cmd: upx -t "{{.BIN_DIR}}/{{.APP_NAME}}.exe" || upx "{{.BIN_DIR}}/{{.APP_NAME}}.exe"
|
||||
platforms: [linux]
|
||||
vars:
|
||||
BUILD_FLAGS: '{{if eq .DEV "true"}}-buildvcs=false -gcflags=all="-l"{{else}}-tags production -trimpath -buildvcs=false -ldflags="-w -s -H windowsgui"{{end}}'
|
||||
VERSION:
|
||||
sh: git describe --tags --always
|
||||
BUILD_FLAGS: '{{if eq .DEV "true"}}-buildvcs=false -gcflags=all="-l"{{else}}-tags production -trimpath -buildvcs=false -ldflags="-w -s -H windowsgui -X mesh-drop/internal/config.Version={{.VERSION}}"{{end}}'
|
||||
env:
|
||||
GOOS: windows
|
||||
CGO_ENABLED: '{{.CGO_ENABLED | default "0"}}'
|
||||
GOARCH: "{{.ARCH | default ARCH}}"
|
||||
|
||||
build:prod:
|
||||
summary: Builds the application for Windows
|
||||
deps:
|
||||
- task: build
|
||||
cmds:
|
||||
- upx --best --lzma "{{.BIN_DIR}}/{{.APP_NAME}}.exe"
|
||||
|
||||
build:docker:
|
||||
summary: Cross-compiles for Windows using Docker with Zig (for CGO builds on non-Windows)
|
||||
internal: true
|
||||
|
||||
Reference in New Issue
Block a user