.goreleaser.yml 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. before:
  2. hooks:
  3. - go mod download
  4. builds:
  5. -
  6. id: ntfy
  7. binary: ntfy
  8. env:
  9. - CGO_ENABLED=1 # required for go-sqlite3
  10. tags: [sqlite_omit_load_extension,osusergo,netgo]
  11. ldflags:
  12. - "-linkmode=external -extldflags=-static -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}}"
  13. goos: [linux]
  14. goarch: [amd64]
  15. -
  16. id: ntfy_arm67
  17. binary: ntfy
  18. env:
  19. - CGO_ENABLED=1 # required for go-sqlite3
  20. - CC=arm-linux-gnueabi-gcc # apt install gcc-arm-linux-gnueabi
  21. tags: [sqlite_omit_load_extension,osusergo,netgo]
  22. ldflags:
  23. - "-linkmode=external -extldflags=-static -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}}"
  24. goos: [linux]
  25. goarch: [arm]
  26. goarm:
  27. - 6
  28. - 7
  29. -
  30. id: ntfy_arm64
  31. binary: ntfy
  32. env:
  33. - CGO_ENABLED=1 # required for go-sqlite3
  34. - CC=aarch64-linux-gnu-gcc # apt install gcc-aarch64-linux-gnu
  35. tags: [sqlite_omit_load_extension,osusergo,netgo]
  36. ldflags:
  37. - "-linkmode=external -extldflags=-static -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}}"
  38. goos: [linux]
  39. goarch: [arm64]
  40. nfpms:
  41. -
  42. package_name: ntfy
  43. homepage: https://heckel.io/ntfy
  44. maintainer: Philipp C. Heckel <philipp.heckel@gmail.com>
  45. description: Simple pub-sub notification service
  46. license: Apache 2.0
  47. formats:
  48. - deb
  49. - rpm
  50. bindir: /usr/bin
  51. contents:
  52. - src: config/config.yml
  53. dst: /etc/ntfy/config.yml
  54. type: config
  55. - src: config/ntfy.service
  56. dst: /lib/systemd/system/ntfy.service
  57. scripts:
  58. postremove: "scripts/postrm.sh"
  59. archives:
  60. -
  61. wrap_in_directory: true
  62. files:
  63. - LICENSE
  64. - README.md
  65. - config/config.yml
  66. - config/ntfy.service
  67. replacements:
  68. 386: i386
  69. amd64: x86_64
  70. checksum:
  71. name_template: 'checksums.txt'
  72. snapshot:
  73. name_template: "{{ .Tag }}-next"
  74. changelog:
  75. sort: asc
  76. filters:
  77. exclude:
  78. - '^docs:'
  79. - '^test:'
  80. dockers:
  81. - image_templates:
  82. - &amd64_image "binwiederhier/ntfy:{{ .Tag }}-amd64"
  83. use: buildx
  84. dockerfile: Dockerfile
  85. goarch: amd64
  86. build_flag_templates:
  87. - "--platform=linux/amd64"
  88. - image_templates:
  89. - &arm64v8_image "binwiederhier/ntfy:{{ .Tag }}-arm64v8"
  90. use: buildx
  91. dockerfile: Dockerfile
  92. goarch: arm64
  93. build_flag_templates:
  94. - "--platform=linux/arm64/v8"
  95. docker_manifests:
  96. - name_template: "binwiederhier/ntfy:latest"
  97. image_templates:
  98. - *amd64_image
  99. - *arm64v8_image
  100. - name_template: "binwiederhier/ntfy:{{ .Tag }}"
  101. image_templates:
  102. - *amd64_image
  103. - *arm64v8_image