.goreleaser.yaml 670 B

12345678910111213141516171819202122232425262728293031323334
  1. before:
  2. hooks:
  3. # You may remove this if you don't use go modules.
  4. - go mod tidy
  5. builds:
  6. - main: ./
  7. env:
  8. - CGO_ENABLED=1
  9. ldflags:
  10. - -s -w
  11. targets:
  12. - linux_amd64
  13. binary: '{{ .ProjectName }}'
  14. - main: ./cli
  15. id: 'nmctl'
  16. env:
  17. - CGO_ENABLED=0
  18. ldflags:
  19. - -s -w
  20. targets:
  21. - linux_amd64
  22. - linux_arm64
  23. - darwin_amd64
  24. - darwin_arm64
  25. - freebsd_amd64
  26. - windows_amd64
  27. binary: 'nmctl'
  28. archives:
  29. - format: binary
  30. name_template: '{{ .Binary }}_{{ .Os }}_{{ .Arch }}{{ with .Arm }}v{{ . }}{{ end }}{{ with .Mips }}_{{ . }}{{ end }}'
  31. release:
  32. prerelease: false