.goreleaser.yml 2.9 KB

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