.goreleaser.yaml 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. builds:
  2. - env:
  3. - CGO_ENABLED=0
  4. dir: cmd/templ
  5. mod_timestamp: '{{ .CommitTimestamp }}'
  6. flags:
  7. - -trimpath
  8. ldflags:
  9. - -s -w
  10. goos:
  11. - linux
  12. - windows
  13. - darwin
  14. checksum:
  15. name_template: 'checksums.txt'
  16. signs:
  17. - id: checksums
  18. cmd: cosign
  19. stdin: '{{ .Env.COSIGN_PASSWORD }}'
  20. output: true
  21. artifacts: checksum
  22. args:
  23. - sign-blob
  24. - --yes
  25. - --key
  26. - env://COSIGN_PRIVATE_KEY
  27. - '--output-certificate=${certificate}'
  28. - '--output-signature=${signature}'
  29. - '${artifact}'
  30. archives:
  31. - format: tar.gz
  32. name_template: >-
  33. {{ .ProjectName }}_
  34. {{- title .Os }}_
  35. {{- if eq .Arch "amd64" }}x86_64
  36. {{- else if eq .Arch "386" }}i386
  37. {{- else }}{{ .Arch }}{{ end }}
  38. {{- if .Arm }}v{{ .Arm }}{{ end }}
  39. kos:
  40. - repository: ghcr.io/a-h/templ
  41. platforms:
  42. - linux/amd64
  43. - linux/arm64
  44. tags:
  45. - latest
  46. - '{{.Tag}}'
  47. bare: true
  48. docker_signs:
  49. - cmd: cosign
  50. artifacts: all
  51. output: true
  52. args:
  53. - sign
  54. - --yes
  55. - --key
  56. - env://COSIGN_PRIVATE_KEY
  57. - '${artifact}'
  58. snapshot:
  59. name_template: "{{ incpatch .Version }}-next"
  60. changelog:
  61. sort: asc
  62. filters:
  63. exclude:
  64. - '^docs:'
  65. - '^test:'