.goreleaser.yml 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. # Visit https://goreleaser.com for documentation on how to customize this
  2. # behavior.
  3. version: 2
  4. before:
  5. hooks:
  6. # this is just an example and not a requirement for provider building/publishing
  7. - go mod tidy
  8. builds:
  9. - env:
  10. # goreleaser does not work with CGO, it could also complicate
  11. # usage by users in CI/CD systems like HCP Terraform where
  12. # they are unable to install libraries.
  13. - CGO_ENABLED=0
  14. mod_timestamp: '{{ .CommitTimestamp }}'
  15. flags:
  16. - -trimpath
  17. ldflags:
  18. - '-s -w -X main.version={{.Version}} -X main.commit={{.Commit}}'
  19. goos:
  20. - freebsd
  21. - windows
  22. - linux
  23. - darwin
  24. goarch:
  25. - amd64
  26. - '386'
  27. - arm
  28. - arm64
  29. ignore:
  30. - goos: darwin
  31. goarch: '386'
  32. binary: '{{ .ProjectName }}_v{{ .Version }}'
  33. archives:
  34. - format: zip
  35. name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}'
  36. checksum:
  37. extra_files:
  38. - glob: 'terraform-registry-manifest.json'
  39. name_template: '{{ .ProjectName }}_{{ .Version }}_manifest.json'
  40. name_template: '{{ .ProjectName }}_{{ .Version }}_SHA256SUMS'
  41. algorithm: sha256
  42. signs:
  43. - artifacts: checksum
  44. args:
  45. # if you are using this in a GitHub action or some other automated pipeline, you
  46. # need to pass the batch flag to indicate its not interactive.
  47. - "--batch"
  48. - "--local-user"
  49. - "{{ .Env.GPG_FINGERPRINT }}" # set this environment variable for your signing key
  50. - "--output"
  51. - "${signature}"
  52. - "--detach-sign"
  53. - "${artifact}"
  54. release:
  55. extra_files:
  56. - glob: 'terraform-registry-manifest.json'
  57. name_template: '{{ .ProjectName }}_{{ .Version }}_manifest.json'
  58. # If you want to manually examine the release before its live, uncomment this line:
  59. # draft: true
  60. changelog:
  61. disable: true