.goreleaser.yml 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  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/images/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. -
  123. id: ntfy_windows
  124. builds:
  125. - ntfy_windows_amd64
  126. format: zip
  127. wrap_in_directory: true
  128. files:
  129. - LICENSE
  130. - README.md
  131. - client/client.yml
  132. -
  133. id: ntfy_darwin
  134. builds:
  135. - ntfy_darwin_all
  136. wrap_in_directory: true
  137. files:
  138. - LICENSE
  139. - README.md
  140. - client/client.yml
  141. universal_binaries:
  142. -
  143. id: ntfy_darwin_all
  144. replace: true
  145. name_template: ntfy
  146. checksum:
  147. name_template: 'checksums.txt'
  148. snapshot:
  149. name_template: "{{ .Tag }}-next"
  150. changelog:
  151. sort: asc
  152. filters:
  153. exclude:
  154. - '^docs:'
  155. - '^test:'
  156. dockers:
  157. - image_templates:
  158. - &amd64_image "binwiederhier/ntfy:{{ .Tag }}-amd64"
  159. use: buildx
  160. dockerfile: Dockerfile
  161. goarch: amd64
  162. build_flag_templates:
  163. - "--platform=linux/amd64"
  164. - image_templates:
  165. - &arm64v8_image "binwiederhier/ntfy:{{ .Tag }}-arm64v8"
  166. use: buildx
  167. dockerfile: Dockerfile-arm
  168. goarch: arm64
  169. build_flag_templates:
  170. - "--platform=linux/arm64/v8"
  171. - image_templates:
  172. - &armv7_image "binwiederhier/ntfy:{{ .Tag }}-armv7"
  173. use: buildx
  174. dockerfile: Dockerfile-arm
  175. goarch: arm
  176. goarm: 7
  177. build_flag_templates:
  178. - "--platform=linux/arm/v7"
  179. - image_templates:
  180. - &armv6_image "binwiederhier/ntfy:{{ .Tag }}-armv6"
  181. use: buildx
  182. dockerfile: Dockerfile-arm
  183. goarch: arm
  184. goarm: 6
  185. build_flag_templates:
  186. - "--platform=linux/arm/v6"
  187. docker_manifests:
  188. - name_template: "binwiederhier/ntfy:latest"
  189. image_templates:
  190. - *amd64_image
  191. - *arm64v8_image
  192. - *armv7_image
  193. - *armv6_image
  194. - name_template: "binwiederhier/ntfy:{{ .Tag }}"
  195. image_templates:
  196. - *amd64_image
  197. - *arm64v8_image
  198. - *armv7_image
  199. - *armv6_image