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