.goreleaser.yaml 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. version: 2
  2. before:
  3. hooks:
  4. - go mod tidy
  5. - go fmt ./...
  6. - go test ./...
  7. builds:
  8. - id: tomll
  9. main: ./cmd/tomll
  10. binary: tomll
  11. env:
  12. - CGO_ENABLED=0
  13. flags:
  14. - -trimpath
  15. ldflags:
  16. - -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.CommitDate}}
  17. mod_timestamp: '{{ .CommitTimestamp }}'
  18. targets:
  19. - linux_amd64
  20. - linux_arm64
  21. - linux_arm
  22. - linux_riscv64
  23. - windows_amd64
  24. - windows_arm64
  25. - windows_arm
  26. - darwin_amd64
  27. - darwin_arm64
  28. - id: tomljson
  29. main: ./cmd/tomljson
  30. binary: tomljson
  31. env:
  32. - CGO_ENABLED=0
  33. flags:
  34. - -trimpath
  35. ldflags:
  36. - -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.CommitDate}}
  37. mod_timestamp: '{{ .CommitTimestamp }}'
  38. targets:
  39. - linux_amd64
  40. - linux_arm64
  41. - linux_arm
  42. - linux_riscv64
  43. - windows_amd64
  44. - windows_arm64
  45. - windows_arm
  46. - darwin_amd64
  47. - darwin_arm64
  48. - id: jsontoml
  49. main: ./cmd/jsontoml
  50. binary: jsontoml
  51. env:
  52. - CGO_ENABLED=0
  53. flags:
  54. - -trimpath
  55. ldflags:
  56. - -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.CommitDate}}
  57. mod_timestamp: '{{ .CommitTimestamp }}'
  58. targets:
  59. - linux_amd64
  60. - linux_arm64
  61. - linux_riscv64
  62. - linux_arm
  63. - windows_amd64
  64. - windows_arm64
  65. - windows_arm
  66. - darwin_amd64
  67. - darwin_arm64
  68. universal_binaries:
  69. - id: tomll
  70. replace: true
  71. name_template: tomll
  72. - id: tomljson
  73. replace: true
  74. name_template: tomljson
  75. - id: jsontoml
  76. replace: true
  77. name_template: jsontoml
  78. archives:
  79. - id: jsontoml
  80. format: tar.xz
  81. builds:
  82. - jsontoml
  83. files:
  84. - none*
  85. name_template: "{{ .Binary }}_{{.Version}}_{{ .Os }}_{{ .Arch }}"
  86. - id: tomljson
  87. format: tar.xz
  88. builds:
  89. - tomljson
  90. files:
  91. - none*
  92. name_template: "{{ .Binary }}_{{.Version}}_{{ .Os }}_{{ .Arch }}"
  93. - id: tomll
  94. format: tar.xz
  95. builds:
  96. - tomll
  97. files:
  98. - none*
  99. name_template: "{{ .Binary }}_{{.Version}}_{{ .Os }}_{{ .Arch }}"
  100. dockers:
  101. - id: tools
  102. goos: linux
  103. goarch: amd64
  104. ids:
  105. - jsontoml
  106. - tomljson
  107. - tomll
  108. image_templates:
  109. - "ghcr.io/pelletier/go-toml:latest"
  110. - "ghcr.io/pelletier/go-toml:{{ .Tag }}"
  111. - "ghcr.io/pelletier/go-toml:v{{ .Major }}"
  112. skip_push: false
  113. checksum:
  114. name_template: 'sha256sums.txt'
  115. snapshot:
  116. version_template: "{{ incpatch .Version }}-next"
  117. release:
  118. github:
  119. owner: pelletier
  120. name: go-toml
  121. draft: true
  122. prerelease: auto
  123. mode: replace
  124. changelog:
  125. use: github-native
  126. announce:
  127. skip: true