github.com/ethersphere/bee/v2@v2.2.0/.goreleaser.yml (about) 1 project_name: bee 2 3 version: 2 4 5 release: 6 prerelease: auto 7 8 git: 9 prerelease_suffix: "-" 10 11 builds: 12 - id: linux 13 main: ./cmd/bee 14 binary: bee 15 flags: 16 - -v 17 - -trimpath 18 ldflags: 19 - -s -w 20 - -X github.com/ethersphere/bee/v2.version={{ .Version }} 21 - -X github.com/ethersphere/bee/v2.commitHash={{ .ShortCommit }} 22 - -X github.com/ethersphere/bee/v2.commitTime={{ .CommitTimestamp }} 23 - -X github.com/ethersphere/bee/v2/pkg/api.Version={{ .Env.BEE_API_VERSION }} 24 env: 25 - CGO_ENABLED=0 26 goos: 27 - linux 28 goarch: 29 - amd64 30 - 386 31 - arm64 32 - arm 33 goarm: 34 - 7 35 - id: linux-slim 36 main: ./cmd/bee 37 binary: bee-slim 38 flags: 39 - -v 40 - -trimpath 41 ldflags: 42 - -s -w 43 - -X github.com/ethersphere/bee/v2.version={{ .Version }} 44 - -X github.com/ethersphere/bee/v2.commitHash={{ .ShortCommit }} 45 - -X github.com/ethersphere/bee/v2.commitTime={{ .CommitTimestamp }} 46 - -X github.com/ethersphere/bee/v2/pkg/api.Version={{ .Env.BEE_API_VERSION }} 47 env: 48 - CGO_ENABLED=0 49 goos: 50 - linux 51 goarch: 52 - amd64 53 - arm64 54 - arm 55 goarm: 56 - 7 57 hooks: 58 post: 59 - upx --best "{{ .Path }}" 60 - id: windows 61 main: ./cmd/bee 62 binary: bee 63 flags: 64 - -v 65 - -trimpath 66 ldflags: 67 - -s -w 68 - -X github.com/ethersphere/bee/v2.version={{ .Version }} 69 - -X github.com/ethersphere/bee/v2.commitHash={{ .ShortCommit }} 70 - -X github.com/ethersphere/bee/v2.commitTime={{ .CommitTimestamp }} 71 - -X github.com/ethersphere/bee/v2/pkg/api.Version={{ .Env.BEE_API_VERSION }} 72 env: 73 - CGO_ENABLED=0 74 goos: 75 - windows 76 goarch: 77 - amd64 78 - 386 79 - id: darwin-amd64 80 main: ./cmd/bee 81 binary: bee 82 flags: 83 - -v 84 - -trimpath 85 ldflags: 86 - -s -w 87 - -X github.com/ethersphere/bee/v2.version={{ .Version }} 88 - -X github.com/ethersphere/bee/v2.commitHash={{ .ShortCommit }} 89 - -X github.com/ethersphere/bee/v2.commitTime={{ .CommitTimestamp }} 90 - -X github.com/ethersphere/bee/v2/pkg/api.Version={{ .Env.BEE_API_VERSION }} 91 env: 92 - CGO_ENABLED=0 93 goos: 94 - darwin 95 goarch: 96 - amd64 97 - id: darwin-arm64 98 main: ./cmd/bee 99 binary: bee 100 flags: 101 - -v 102 - -trimpath 103 ldflags: 104 - -s -w 105 - -X github.com/ethersphere/bee/v2.version={{ .Version }} 106 - -X github.com/ethersphere/bee/v2.commitHash={{ .ShortCommit }} 107 - -X github.com/ethersphere/bee/v2.commitTime={{ .CommitTimestamp }} 108 - -X github.com/ethersphere/bee/v2/pkg/api.Version={{ .Env.BEE_API_VERSION }} 109 env: 110 - CGO_ENABLED=0 111 goos: 112 - darwin 113 goarch: 114 - arm64 115 116 snapshot: 117 name_template: "{{.Tag}}-snapshot" 118 119 signs: 120 - artifacts: checksum 121 args: [ 122 "--pinentry-mode", "loopback", 123 "--passphrase", "{{ .Env.GPG_PASSPHRASE }}", 124 "-u", "{{ .Env.GPG_FINGERPRINT }}", 125 "--output", "${signature}", 126 "--detach-sign", "${artifact}", 127 ] 128 129 archives: 130 - 131 id: scoop 132 builds: 133 - windows 134 name_template: "{{ tolower .ProjectName }}-{{ tolower .Os }}-{{ tolower .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}" 135 format: zip 136 wrap_in_directory: false 137 files: 138 - packaging/scoop/bee.yaml 139 - LICENSE 140 - README.md 141 - 142 name_template: "{{ tolower .ProjectName }}-{{ tolower .Os }}-{{ tolower .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}" 143 format: binary 144 builds: 145 - linux 146 - windows 147 - darwin-amd64 148 - darwin-arm64 149 - 150 id: homebrew-amd64 151 builds: 152 - darwin-amd64 153 name_template: "{{ tolower .ProjectName }}-{{ tolower .Os }}-{{ tolower .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}" 154 files: 155 - src: 'packaging/homebrew-amd64/*' 156 dst: '.' 157 strip_parent: true 158 - LICENSE 159 - README.md 160 - 161 id: homebrew-arm64 162 builds: 163 - darwin-arm64 164 name_template: "{{ tolower .ProjectName }}-{{ tolower .Os }}-{{ tolower .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}" 165 files: 166 - src: 'packaging/homebrew-arm64/*' 167 dst: '.' 168 strip_parent: true 169 - LICENSE 170 - README.md 171 172 nfpms: 173 - file_name_template: >- 174 {{ tolower .ProjectName }}_ 175 {{- tolower .Version }}_ 176 {{- if eq .Arch "arm" }}armhf 177 {{- else }}{{ tolower .Arch }}{{ end }} 178 179 id: packages 180 181 vendor: Swarm Foundation 182 183 homepage: https://www.ethswarm.org 184 185 maintainer: Swarm Devops <devops@ethswarm.org> 186 187 description: Ethereum Swarm node 188 189 license: GPL-3 190 191 dependencies: 192 - ca-certificates 193 - adduser 194 195 formats: 196 - deb 197 - rpm 198 199 contents: 200 - src: packaging/bee.service 201 dst: /lib/systemd/system/bee.service 202 - src: packaging/bee-get-addr 203 dst: /usr/bin/bee-get-addr 204 - src: packaging/bee.yaml 205 dst: /etc/bee/bee.yaml 206 type: config 207 - src: packaging/default 208 dst: /etc/default/bee 209 type: config 210 211 overrides: 212 deb: 213 dependencies: 214 - passwd 215 - ca-certificates 216 scripts: 217 preinstall: ./packaging/deb/preinst 218 postinstall: ./packaging/deb/postinst 219 preremove: ./packaging/deb/prerm 220 postremove: ./packaging/deb/postrm 221 rpm: 222 dependencies: 223 - ca-certificates 224 - shadow-utils 225 file_name_template: >- 226 {{ tolower .ProjectName }}- 227 {{- tolower .Version }}. 228 {{- if eq .Arch "amd64" }}x86_64 229 {{- else if eq .Arch "arm64" }}aarch64 230 {{- else }}{{ tolower .Arch }}{{ end }} 231 scripts: 232 preinstall: ./packaging/rpm/pre 233 postinstall: ./packaging/rpm/post 234 preremove: ./packaging/rpm/preun 235 postremove: ./packaging/rpm/postun 236 237 bindir: /usr/bin 238 239 publishers: 240 - name: gemfury 241 ids: 242 - packages 243 dir: "{{ dir .ArtifactPath }}" 244 cmd: bash -c "if [[ \"{{ .Prerelease }}\" == \"\" ]]; then curl -F package=@{{ .ArtifactName }} https://{{ .Env.GEMFURY_TOKEN }}@push.fury.io/ethersphere/; else echo SKIPPING PRERELEASE!; fi" 245 246 scoops: 247 - url_template: "https://github.com/ethersphere/bee/releases/download/{{ .Tag }}/{{ .ArtifactName }}" 248 repository: 249 owner: ethersphere 250 name: scoop 251 token: "{{ .Env.SCOOP_PAT }}" 252 253 commit_author: 254 name: bee-worker 255 email: bee-worker@ethswarm.org 256 257 commit_msg_template: "Scoop update for {{ .ProjectName }} version {{ .Tag }}" 258 259 homepage: "https://github.com/ethersphere/bee" 260 261 description: "Swarm client implemented in Go." 262 263 license: BSD-3-Clause 264 265 persist: 266 - "data" 267 - "packaging/scoop/bee.yaml" 268 269 post_install: 270 - "Write-Host 'Running postinstall command'" 271 - "if(!(Test-Path $persist_dir\\bee.yaml)){New-Item -ItemType SymbolicLink -Path \"$persist_dir\\bee.yaml\" -Target \"$persist_dir\\packaging\\scoop\\bee.yaml\" | Out-Null}" 272 - "(Get-Content -path $persist_dir\\bee.yaml -Raw) -replace './bee.yaml',\"$persist_dir\\bee.yaml\" | Set-Content -Path $persist_dir\\bee.yaml" 273 - "(Get-Content -path $persist_dir\\bee.yaml -Raw) -replace './data',\"$persist_dir\\data\" | Set-Content -Path $persist_dir\\bee.yaml" 274 - "(Get-Content -path $persist_dir\\bee.yaml -Raw) -replace './password',\"$persist_dir\\password\" | Set-Content -Path $persist_dir\\bee.yaml" 275 - "if(!(Test-Path $persist_dir\\password)){[System.Web.Security.Membership]::GeneratePassword(32,5) | Set-Content -Path $persist_dir\\password}" 276 - "if(sc.exe query SwarmBeeSvc | Select-String FAILED){sc.exe create SwarmBeeSvc binPath= \"$dir\\bee.exe start --config=$persist_dir\\bee.yaml\" type= share start= auto displayName= \"Bee\"; sc.exe description SwarmBeeSvc \"Swarm client implemented in Go.\"}" 277 - "if($global){$ETH_ADDRESS = (((C:\\ProgramData\\scoop\\shims\\bee.exe init --config=$persist_dir\\bee.yaml | Select-String ethereum) -split ' ‘)[-1]).Trim('\"')} else {$ETH_ADDRESS = (((bee.exe init --config=$persist_dir\\bee.yaml | Select-String ethereum) -split ' ‘)[-1]).Trim('\"')}; Write-Host \"Please make sure there is XDAI and, if required, XBZZ available on the following Ethereum address on Gnosis Chain: $ETH_ADDRESS\nLearn how to fund your node by visiting our docs at https://docs.ethswarm.org/docs/installation/fund-your-node\"" 278 - "Write-Host \"Bee requires a Gnosis Chain RPC endpoint to function. By default this is expected to be found at ws://localhost:8546.\nPlease see https://docs.ethswarm.org/docs/installation/install for more details on how to configure your node.\nConfig: $persist_dir\\bee.yaml\"" 279 - "Write-Host \"Once your node's wallet has received the funds deploy Bee chequebook with [sudo] $dir\\bee.exe deploy --config=$persist_dir\\bee.yaml\"" 280 - "Write-Host 'Start Bee service with [sudo] sc.exe start SwarmBeeSvc'" 281 282 brews: 283 - name: swarm-bee 284 repository: 285 owner: ethersphere 286 name: homebrew-tap 287 token: "{{ .Env.HOMEBREW_TAP_PAT }}" 288 ids: 289 - homebrew-amd64 290 - homebrew-arm64 291 commit_author: 292 name: bee-worker 293 email: bee-worker@ethswarm.org 294 homepage: https://swarm.ethereum.org/ 295 description: Ethereum Swarm node 296 caveats: | 297 Logs: #{var}/log/swarm-bee/bee.log 298 Config: #{etc}/swarm-bee/bee.yaml 299 300 Bee requires a Gnosis Chain RPC endpoint to function. By default this is expected to be found at ws://localhost:8546. 301 302 Please see https://docs.ethswarm.org/docs/installation/install for more details on how to configure your node. 303 304 After you finish configuration run 'bee-get-addr' and fund your node with XDAI, and also XBZZ if so desired. 305 test: | 306 system "#{bin}/bee version" 307 install: | 308 (etc/"swarm-bee").mkpath 309 (var/"lib/swarm-bee").mkpath 310 bin.install ["bee", "bee-get-addr"] 311 etc.install "bee.yaml" => "swarm-bee/bee.yaml" unless File.exists? etc/"swarm-bee/bee.yaml" 312 post_install: | 313 unless File.exists? "#{var}/lib/swarm-bee/password" 314 system("openssl", "rand", "-out", var/"lib/swarm-bee/password", "-base64", "32") 315 end 316 system(bin/"bee", "init", "--config", etc/"swarm-bee/bee.yaml", ">/dev/null", "2>&1") 317 service: | 318 run [bin/"bee", "start", "--config", etc/"swarm-bee/bee.yaml"] 319 keep_alive true 320 error_log_path var/"log/swarm-bee/bee.log" 321 log_path var/"log/swarm-bee/bee.log" 322 323 dockers: 324 - image_templates: 325 - "ethersphere/bee:{{ .Version }}-amd64" 326 - "quay.io/ethersphere/bee:{{ .Version }}-amd64" 327 use: buildx 328 ids: 329 - linux 330 goarch: amd64 331 dockerfile: Dockerfile.goreleaser 332 build_flag_templates: 333 - "--platform=linux/amd64" 334 - "--pull" 335 - "--label=org.opencontainers.image.created={{.Date}}" 336 - "--label=org.opencontainers.image.title={{.ProjectName}}" 337 - "--label=org.opencontainers.image.revision={{.FullCommit}}" 338 - "--label=org.opencontainers.image.version={{.Version}}" 339 - image_templates: 340 - "ethersphere/bee:{{ .Version }}-armv7" 341 - "quay.io/ethersphere/bee:{{ .Version }}-armv7" 342 use: buildx 343 ids: 344 - linux 345 goarch: arm 346 goarm: 7 347 dockerfile: Dockerfile.goreleaser 348 build_flag_templates: 349 - "--platform=linux/arm/v7" 350 - "--pull" 351 - "--label=org.opencontainers.image.created={{.Date}}" 352 - "--label=org.opencontainers.image.title={{.ProjectName}}" 353 - "--label=org.opencontainers.image.revision={{.FullCommit}}" 354 - "--label=org.opencontainers.image.version={{.Version}}" 355 - image_templates: 356 - "ethersphere/bee:{{ .Version }}-arm64v8" 357 - "quay.io/ethersphere/bee:{{ .Version }}-arm64v8" 358 use: buildx 359 ids: 360 - linux 361 goarch: arm64 362 dockerfile: Dockerfile.goreleaser 363 build_flag_templates: 364 - "--platform=linux/arm64/v8" 365 - "--pull" 366 - "--label=org.opencontainers.image.created={{.Date}}" 367 - "--label=org.opencontainers.image.title={{.ProjectName}}" 368 - "--label=org.opencontainers.image.revision={{.FullCommit}}" 369 - "--label=org.opencontainers.image.version={{.Version}}" 370 - image_templates: 371 - "ethersphere/bee:{{ .Version }}-amd64-slim" 372 - "quay.io/ethersphere/bee:{{ .Version }}-amd64-slim" 373 use: buildx 374 ids: 375 - linux-slim 376 goarch: amd64 377 dockerfile: Dockerfile.scratch 378 build_flag_templates: 379 - "--platform=linux/amd64" 380 - "--pull" 381 - "--label=org.opencontainers.image.created={{.Date}}" 382 - "--label=org.opencontainers.image.title={{.ProjectName}}" 383 - "--label=org.opencontainers.image.revision={{.FullCommit}}" 384 - "--label=org.opencontainers.image.version={{.Version}}-slim" 385 - image_templates: 386 - "ethersphere/bee:{{ .Version }}-armv7-slim" 387 - "quay.io/ethersphere/bee:{{ .Version }}-armv7-slim" 388 use: buildx 389 ids: 390 - linux-slim 391 goarch: arm 392 goarm: 7 393 dockerfile: Dockerfile.scratch 394 build_flag_templates: 395 - "--platform=linux/arm/v7" 396 - "--pull" 397 - "--label=org.opencontainers.image.created={{.Date}}" 398 - "--label=org.opencontainers.image.title={{.ProjectName}}" 399 - "--label=org.opencontainers.image.revision={{.FullCommit}}" 400 - "--label=org.opencontainers.image.version={{.Version}}-slim" 401 - image_templates: 402 - "ethersphere/bee:{{ .Version }}-arm64v8-slim" 403 - "quay.io/ethersphere/bee:{{ .Version }}-arm64v8-slim" 404 use: buildx 405 ids: 406 - linux-slim 407 goarch: arm64 408 dockerfile: Dockerfile.scratch 409 build_flag_templates: 410 - "--platform=linux/arm64/v8" 411 - "--pull" 412 - "--label=org.opencontainers.image.created={{.Date}}" 413 - "--label=org.opencontainers.image.title={{.ProjectName}}" 414 - "--label=org.opencontainers.image.revision={{.FullCommit}}" 415 - "--label=org.opencontainers.image.version={{.Version}}-slim" 416 docker_manifests: 417 - name_template: ethersphere/bee:{{ .Major }} 418 image_templates: 419 - ethersphere/bee:{{ .Version }}-amd64 420 - ethersphere/bee:{{ .Version }}-armv7 421 - ethersphere/bee:{{ .Version }}-arm64v8 422 skip_push: auto 423 - name_template: ethersphere/bee:{{ .Major }}.{{ .Minor }} 424 image_templates: 425 - ethersphere/bee:{{ .Version }}-amd64 426 - ethersphere/bee:{{ .Version }}-armv7 427 - ethersphere/bee:{{ .Version }}-arm64v8 428 skip_push: auto 429 - name_template: ethersphere/bee:{{ .Major }}.{{ .Minor }}.{{ .Patch }}{{ with .Prerelease }}-{{ . }}{{ end }} 430 image_templates: 431 - ethersphere/bee:{{ .Version }}-amd64 432 - ethersphere/bee:{{ .Version }}-armv7 433 - ethersphere/bee:{{ .Version }}-arm64v8 434 - name_template: ethersphere/bee:latest 435 image_templates: 436 - ethersphere/bee:{{ .Version }}-amd64 437 - ethersphere/bee:{{ .Version }}-armv7 438 - ethersphere/bee:{{ .Version }}-arm64v8 439 - name_template: ethersphere/bee:stable 440 image_templates: 441 - ethersphere/bee:{{ .Version }}-amd64 442 - ethersphere/bee:{{ .Version }}-armv7 443 - ethersphere/bee:{{ .Version }}-arm64v8 444 skip_push: auto 445 - name_template: quay.io/ethersphere/bee:{{ .Major }} 446 image_templates: 447 - quay.io/ethersphere/bee:{{ .Version }}-amd64 448 - quay.io/ethersphere/bee:{{ .Version }}-armv7 449 - quay.io/ethersphere/bee:{{ .Version }}-arm64v8 450 skip_push: auto 451 - name_template: quay.io/ethersphere/bee:{{ .Major }}.{{ .Minor }} 452 image_templates: 453 - quay.io/ethersphere/bee:{{ .Version }}-amd64 454 - quay.io/ethersphere/bee:{{ .Version }}-armv7 455 - quay.io/ethersphere/bee:{{ .Version }}-arm64v8 456 skip_push: auto 457 - name_template: quay.io/ethersphere/bee:{{ .Major }}.{{ .Minor }}.{{ .Patch }}{{ with .Prerelease }}-{{ . }}{{ end }} 458 image_templates: 459 - quay.io/ethersphere/bee:{{ .Version }}-amd64 460 - quay.io/ethersphere/bee:{{ .Version }}-armv7 461 - quay.io/ethersphere/bee:{{ .Version }}-arm64v8 462 - name_template: quay.io/ethersphere/bee:latest 463 image_templates: 464 - quay.io/ethersphere/bee:{{ .Version }}-amd64 465 - quay.io/ethersphere/bee:{{ .Version }}-armv7 466 - quay.io/ethersphere/bee:{{ .Version }}-arm64v8 467 - name_template: quay.io/ethersphere/bee:stable 468 image_templates: 469 - quay.io/ethersphere/bee:{{ .Version }}-amd64 470 - quay.io/ethersphere/bee:{{ .Version }}-armv7 471 - quay.io/ethersphere/bee:{{ .Version }}-arm64v8 472 skip_push: auto 473 - name_template: ethersphere/bee:{{ .Major }}-slim 474 image_templates: 475 - ethersphere/bee:{{ .Version }}-amd64-slim 476 - ethersphere/bee:{{ .Version }}-armv7-slim 477 - ethersphere/bee:{{ .Version }}-arm64v8-slim 478 skip_push: auto 479 - name_template: ethersphere/bee:{{ .Major }}.{{ .Minor }}-slim 480 image_templates: 481 - ethersphere/bee:{{ .Version }}-amd64-slim 482 - ethersphere/bee:{{ .Version }}-armv7-slim 483 - ethersphere/bee:{{ .Version }}-arm64v8-slim 484 skip_push: auto 485 - name_template: ethersphere/bee:{{ .Major }}.{{ .Minor }}.{{ .Patch }}{{ with .Prerelease }}-{{ . }}{{ end }}-slim 486 image_templates: 487 - ethersphere/bee:{{ .Version }}-amd64-slim 488 - ethersphere/bee:{{ .Version }}-armv7-slim 489 - ethersphere/bee:{{ .Version }}-arm64v8 490 - name_template: ethersphere/bee:latest-slim 491 image_templates: 492 - ethersphere/bee:{{ .Version }}-amd64-slim 493 - ethersphere/bee:{{ .Version }}-armv7-slim 494 - ethersphere/bee:{{ .Version }}-arm64v8-slim 495 - name_template: ethersphere/bee:stable-slim 496 image_templates: 497 - ethersphere/bee:{{ .Version }}-amd64-slim 498 - ethersphere/bee:{{ .Version }}-armv7-slim 499 - ethersphere/bee:{{ .Version }}-arm64v8-slim 500 skip_push: auto 501 - name_template: quay.io/ethersphere/bee:{{ .Major }}-slim 502 image_templates: 503 - quay.io/ethersphere/bee:{{ .Version }}-amd64-slim 504 - quay.io/ethersphere/bee:{{ .Version }}-armv7-slim 505 - quay.io/ethersphere/bee:{{ .Version }}-arm64v8-slim 506 skip_push: auto 507 - name_template: quay.io/ethersphere/bee:{{ .Major }}.{{ .Minor }}-slim 508 image_templates: 509 - quay.io/ethersphere/bee:{{ .Version }}-amd64-slim 510 - quay.io/ethersphere/bee:{{ .Version }}-armv7-slim 511 - quay.io/ethersphere/bee:{{ .Version }}-arm64v8-slim 512 skip_push: auto 513 - name_template: quay.io/ethersphere/bee:{{ .Major }}.{{ .Minor }}.{{ .Patch }}{{ with .Prerelease }}-{{ . }}{{ end }}-slim 514 image_templates: 515 - quay.io/ethersphere/bee:{{ .Version }}-amd64-slim 516 - quay.io/ethersphere/bee:{{ .Version }}-armv7-slim 517 - quay.io/ethersphere/bee:{{ .Version }}-arm64v8-slim 518 - name_template: quay.io/ethersphere/bee:latest-slim 519 image_templates: 520 - quay.io/ethersphere/bee:{{ .Version }}-amd64-slim 521 - quay.io/ethersphere/bee:{{ .Version }}-armv7-slim 522 - quay.io/ethersphere/bee:{{ .Version }}-arm64v8-slim 523 - name_template: quay.io/ethersphere/bee:stable-slim 524 image_templates: 525 - quay.io/ethersphere/bee:{{ .Version }}-amd64-slim 526 - quay.io/ethersphere/bee:{{ .Version }}-armv7-slim 527 - quay.io/ethersphere/bee:{{ .Version }}-arm64v8-slim 528 skip_push: auto