.goreleaser.yml 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205
  1. before:
  2. hooks:
  3. - go mod download
  4. - go mod tidy
  5. builds:
  6. -
  7. id: ntfy_linux_amd64
  8. binary: ntfy
  9. env:
  10. - CGO_ENABLED=1 # required for go-sqlite3
  11. tags: [sqlite_omit_load_extension,osusergo,netgo]
  12. ldflags:
  13. - "-linkmode=external -extldflags=-static -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}}"
  14. goos: [linux]
  15. goarch: [amd64]
  16. -
  17. id: ntfy_linux_armv6
  18. binary: ntfy
  19. env:
  20. - CGO_ENABLED=1 # required for go-sqlite3
  21. - CC=arm-linux-gnueabi-gcc # apt install gcc-arm-linux-gnueabi
  22. tags: [sqlite_omit_load_extension,osusergo,netgo]
  23. ldflags:
  24. - "-linkmode=external -extldflags=-static -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}}"
  25. goos: [linux]
  26. goarch: [arm]
  27. goarm: [6]
  28. -
  29. id: ntfy_linux_armv7
  30. binary: ntfy
  31. env:
  32. - CGO_ENABLED=1 # required for go-sqlite3
  33. - CC=arm-linux-gnueabi-gcc # apt install gcc-arm-linux-gnueabi
  34. tags: [sqlite_omit_load_extension,osusergo,netgo]
  35. ldflags:
  36. - "-linkmode=external -extldflags=-static -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}}"
  37. goos: [linux]
  38. goarch: [arm]
  39. goarm: [7]
  40. -
  41. id: ntfy_linux_arm64
  42. binary: ntfy
  43. env:
  44. - CGO_ENABLED=1 # required for go-sqlite3
  45. - CC=aarch64-linux-gnu-gcc # apt install gcc-aarch64-linux-gnu
  46. tags: [sqlite_omit_load_extension,osusergo,netgo]
  47. ldflags:
  48. - "-linkmode=external -extldflags=-static -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}}"
  49. goos: [linux]
  50. goarch: [arm64]
  51. -
  52. id: ntfy_windows_amd64
  53. binary: ntfy
  54. env:
  55. - CGO_ENABLED=0 # explicitly disable, since we don't need go-sqlite3
  56. tags: [noserver] # don't include server files
  57. ldflags:
  58. - "-X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}}"
  59. goos: [windows]
  60. goarch: [amd64]
  61. -
  62. id: ntfy_darwin_all
  63. binary: ntfy
  64. env:
  65. - CGO_ENABLED=0 # explicitly disable, since we don't need go-sqlite3
  66. tags: [noserver] # don't include server files
  67. ldflags:
  68. - "-X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}}"
  69. goos: [darwin]
  70. goarch: [amd64, arm64] # will be combined to "universal binary" (see below)
  71. nfpms:
  72. -
  73. package_name: ntfy
  74. homepage: https://heckel.io/ntfy
  75. maintainer: Philipp C. Heckel <philipp.heckel@gmail.com>
  76. description: Simple pub-sub notification service
  77. license: Apache 2.0
  78. formats:
  79. - deb
  80. - rpm
  81. bindir: /usr/bin
  82. contents:
  83. - src: server/server.yml
  84. dst: /etc/ntfy/server.yml
  85. type: "config|noreplace"
  86. - src: server/ntfy.service
  87. dst: /lib/systemd/system/ntfy.service
  88. - src: client/client.yml
  89. dst: /etc/ntfy/client.yml
  90. type: "config|noreplace"
  91. - src: client/ntfy-client.service
  92. dst: /lib/systemd/system/ntfy-client.service
  93. - dst: /var/cache/ntfy
  94. type: dir
  95. - dst: /var/cache/ntfy/attachments
  96. type: dir
  97. - dst: /var/lib/ntfy
  98. type: dir
  99. - dst: /usr/share/ntfy/logo.png
  100. src: web/public/static/img/ntfy.png
  101. scripts:
  102. preinstall: "scripts/preinst.sh"
  103. postinstall: "scripts/postinst.sh"
  104. preremove: "scripts/prerm.sh"
  105. postremove: "scripts/postrm.sh"
  106. archives:
  107. -
  108. id: ntfy_linux
  109. builds:
  110. - ntfy_linux_amd64
  111. - ntfy_linux_armv6
  112. - ntfy_linux_armv7
  113. - ntfy_linux_arm64
  114. wrap_in_directory: true
  115. files:
  116. - LICENSE
  117. - README.md
  118. - server/server.yml
  119. - server/ntfy.service
  120. - client/client.yml
  121. - client/ntfy-client.service
  122. replacements:
  123. amd64: x86_64
  124. -
  125. id: ntfy_windows
  126. builds:
  127. - ntfy_windows_amd64
  128. format: zip
  129. wrap_in_directory: true
  130. files:
  131. - LICENSE
  132. - README.md
  133. - client/client.yml
  134. replacements:
  135. amd64: x86_64
  136. -
  137. id: ntfy_darwin
  138. builds:
  139. - ntfy_darwin_all
  140. wrap_in_directory: true
  141. files:
  142. - LICENSE
  143. - README.md
  144. - client/client.yml
  145. replacements:
  146. darwin: macOS
  147. universal_binaries:
  148. -
  149. id: ntfy_darwin_all
  150. replace: true
  151. name_template: ntfy
  152. checksum:
  153. name_template: 'checksums.txt'
  154. snapshot:
  155. name_template: "{{ .Tag }}-next"
  156. changelog:
  157. sort: asc
  158. filters:
  159. exclude:
  160. - '^docs:'
  161. - '^test:'
  162. dockers:
  163. - image_templates:
  164. - &amd64_image "binwiederhier/ntfy:{{ .Tag }}-amd64"
  165. use: buildx
  166. dockerfile: Dockerfile
  167. goarch: amd64
  168. build_flag_templates:
  169. - "--platform=linux/amd64"
  170. - image_templates:
  171. - &arm64v8_image "binwiederhier/ntfy:{{ .Tag }}-arm64v8"
  172. use: buildx
  173. dockerfile: Dockerfile
  174. goarch: arm64
  175. build_flag_templates:
  176. - "--platform=linux/arm64/v8"
  177. - image_templates:
  178. - &armv7_image "binwiederhier/ntfy:{{ .Tag }}-armv7"
  179. use: buildx
  180. dockerfile: Dockerfile
  181. goarch: arm
  182. goarm: 7
  183. build_flag_templates:
  184. - "--platform=linux/arm/v7"
  185. - image_templates:
  186. - &armv6_image "binwiederhier/ntfy:{{ .Tag }}-armv6"
  187. use: buildx
  188. dockerfile: Dockerfile
  189. goarch: arm
  190. goarm: 6
  191. build_flag_templates:
  192. - "--platform=linux/arm/v6"
  193. docker_manifests:
  194. - name_template: "binwiederhier/ntfy:latest"
  195. image_templates:
  196. - *amd64_image
  197. - *arm64v8_image
  198. - *armv7_image
  199. - *armv6_image
  200. - name_template: "binwiederhier/ntfy:{{ .Tag }}"
  201. image_templates:
  202. - *amd64_image
  203. - *arm64v8_image
  204. - *armv7_image
  205. - *armv6_image