1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383
|
######################################################################################################
# #
# Shoutrrr GoReleaser Development Release Configuration #
# #
# Shoutrrr: https://github.com/nicholas-fedor/shoutrrr/ #
# GoReleaser: https://goreleaser.com/ #
# #
######################################################################################################
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
version: 2
# https://goreleaser.com/customization/project/
project_name: shoutrrr
######################################################################################################
# Snapshot Configuration
# https://goreleaser.com/customization/snapshots/
######################################################################################################
snapshot:
# Change the name of the generated snapshot.
# Default: `{{ .Version }}-SNAPSHOT-{{.ShortCommit}}`
# Expected:
version_template: "{{ .Tag }}-{{ .ShortCommit }}"
######################################################################################################
######################################################################################################
# Go Binary Build Configuration
# https://goreleaser.com/customization/builds/go/
######################################################################################################
builds:
- # Path to main.go file or main package.
main: ./shoutrrr/main.go
# Binary name.
binary: shoutrrr
# Custom flags.
flags:
# trims path
- -trimpath
# Custom ldflags.
# For more info refer to: https://pkg.go.dev/cmd/go#hdr-Compile_packages_and_dependencies
# and https://pkg.go.dev/cmd/link
ldflags:
- -s -w
- -X main.version={{.Version}}
- -X main.commit={{.Commit}}
- -X main.date={{ .CommitDate }}
- -X github.com/nicholas-fedor/shoutrrr/internal/meta.Version={{ .Version }}
- -X github.com/nicholas-fedor/shoutrrr/internal/meta.Commit={{ .Commit }}
- -X github.com/nicholas-fedor/shoutrrr/internal/meta.Date={{ .Date }}
# Custom environment variables to be set during the builds.
# Invalid environment variables will be ignored.
# For more info refer to: https://pkg.go.dev/cmd/go#hdr-Environment_variables
env:
- CGO_ENABLED=0
# GOOS list to build for.
# For more info refer to: https://pkg.go.dev/cmd/go#hdr-Environment_variables
goos:
- linux
- windows
- darwin
# GOARCH to build for.
# For more info refer to: https://pkg.go.dev/cmd/go#hdr-Environment_variables
goarch:
- amd64
- "386"
- arm
- arm64
- riscv64
# GOARM to build for when GOARCH is arm.
# For more info refer to: https://pkg.go.dev/cmd/go#hdr-Environment_variables
# and https://go.dev/wiki/MinimumRequirements#microarchitecture-support
# Default: [ 6 ].
# GOAMD64 to build when GOARCH is amd64.
# For more info refer to: https://pkg.go.dev/cmd/go#hdr-Environment_variables
# and https://go.dev/wiki/MinimumRequirements#microarchitecture-support
# Default: [ 'v1' ].
# GO386 to build when GOARCH is 386.
# For more info refer to: https://pkg.go.dev/cmd/go#hdr-Environment_variables
# and https://go.dev/wiki/MinimumRequirements#microarchitecture-support
# Default: [ 'sse2' ].
# Since: v2.4.
# GORISCV64 to build when GOARCH is RISCV64.
# For more info refer to: https://pkg.go.dev/cmd/go#hdr-Environment_variables
# and https://go.dev/wiki/MinimumRequirements#microarchitecture-support
# Default: [ 'rva20u64' ].
# Since: v2.4.
# List of combinations of GOOS + GOARCH + GOARM to ignore.
ignore:
- goos: windows
goarch: riscv64
# Set the modified timestamp on the output binary, typically
# you would do this to ensure a build was reproducible.
# Pass an empty string to skip modifying the output.
mod_timestamp: "{{ .CommitTimestamp }}"
######################################################################################################
# Skip building archives for development releases
######################################################################################################
# Docker Image Build Configuration
# https://goreleaser.com/customization/docker/
######################################################################################################
dockers:
- ##################################################################################################
# shoutrrr:amd64
##################################################################################################
# GOOS of the built binaries/packages that should be used.
goos: linux
# GOARCH of the built binaries/packages that should be used.
goarch: amd64
# GOAMD64 of the built binaries/packages that should be used.
# Default: 'v1'.
# Templates of the Docker image names.
# Templates: allowed.
image_templates:
- nickfedor/shoutrrr:amd64-dev
- ghcr.io/nicholas-fedor/shoutrrr:amd64-dev
# Path to the Dockerfile (from the project root).
# Templates: allowed.
# Default: 'Dockerfile'.
dockerfile: build/docker/Dockerfile
# Set the "backend" for the Docker pipe.
# Valid options are: docker, buildx, podman.
# Podman is a GoReleaser Pro feature and is only available on Linux.
# Default: 'docker'.
use: buildx
# Docker build flags.
# Templates: allowed.
build_flag_templates:
# Conditionally set Docker Buildx output to local (type=docker) if DRY_RUN=true, otherwise pushes to a registry (type=registry).
- '--output={{ if eq .Env.DRY_RUN "true" }}type=docker{{ else }}type=registry{{ end }}'
# Enables maximum provenance attestation for the Docker Buildx build, generating detailed build metadata for supply chain security.
- --attest=type=provenance,mode=max
# Generates a Software Bill of Materials (SBOM) attestation for the Docker Buildx build, documenting the software components in the image.
- --attest=type=sbom
# Specifies the target platform for the Docker image as Linux on AMD64 architecture.
- "--platform=linux/amd64"
# Sets the Go build environment variable GOOS to linux, indicating the target operating system for the Go binary.
- "--build-arg=GOOS=linux"
# Sets the Go build environment variable GOARCH to amd64, indicating the target architecture for the Go binary.
- "--build-arg=GOARCH=amd64"
# Specifies the name of the image
- "--label=org.opencontainers.image.name={{ .ProjectName }}"
# Records the image creation timestamp
- "--label=org.opencontainers.image.created={{ .Date }}"
# Indicates the version of the software in the image
- "--label=org.opencontainers.image.version={{ .Version }}"
# Tracks the exact Git commit SHA used to build the image
- "--label=org.opencontainers.image.revision={{ .FullCommit }}"
# Points to the source repository URL
- "--label=org.opencontainers.image.source={{ .GitURL }}"
- ##################################################################################################
# shoutrrr:i386
##################################################################################################
# GOOS of the built binaries/packages that should be used.
goos: linux
# GOARCH of the built binaries/packages that should be used.
goarch: "386"
# Templates of the Docker image names.
# Templates: allowed.
image_templates:
- nickfedor/shoutrrr:i386-dev
- ghcr.io/nicholas-fedor/shoutrrr:i386-dev
# Path to the Dockerfile (from the project root).
# Templates: allowed.
# Default: 'Dockerfile'.
dockerfile: build/docker/Dockerfile
# Set the "backend" for the Docker pipe.
# Valid options are: docker, buildx, podman.
# Podman is a GoReleaser Pro feature and is only available on Linux.
# Default: 'docker'.
use: buildx
# Docker build flags.
# Templates: allowed.
build_flag_templates:
# Conditionally set Docker Buildx output to local (type=docker) if DRY_RUN=true, otherwise pushes to a registry (type=registry).
- '--output={{ if eq .Env.DRY_RUN "true" }}type=docker{{ else }}type=registry{{ end }}'
# Enables maximum provenance attestation for the Docker Buildx build, generating detailed build metadata for supply chain security.
- --attest=type=provenance,mode=max
# Generates a Software Bill of Materials (SBOM) attestation for the Docker Buildx build, documenting the software components in the image.
- --attest=type=sbom
# Specifies the target platform for the Docker image as Linux on 386 architecture.
- "--platform=linux/386"
# Sets the Go build environment variable GOOS to linux, indicating the target operating system for the Go binary.
- "--build-arg=GOOS=linux"
# Sets the Go build environment variable GOARCH to 386, indicating the target architecture for the Go binary.
- "--build-arg=GOARCH=386"
# Specifies the name of the image
- "--label=org.opencontainers.image.name={{ .ProjectName }}"
# Records the image creation timestamp
- "--label=org.opencontainers.image.created={{ .Date }}"
# Indicates the version of the software in the image
- "--label=org.opencontainers.image.version={{ .Version }}"
# Tracks the exact Git commit SHA used to build the image
- "--label=org.opencontainers.image.revision={{ .FullCommit }}"
# Points to the source repository URL
- "--label=org.opencontainers.image.source={{ .GitURL }}"
- ##################################################################################################
# shoutrrr:armhf
##################################################################################################
# GOOS of the built binaries/packages that should be used.
goos: linux
# GOARCH of the built binaries/packages that should be used.
goarch: arm
# GOARM of the built binaries/packages that should be used.
# Default: '6'.
goarm: "6"
# Templates of the Docker image names.
# Templates: allowed.
image_templates:
- nickfedor/shoutrrr:armhf-dev
- ghcr.io/nicholas-fedor/shoutrrr:armhf-dev
# Path to the Dockerfile (from the project root).
# Templates: allowed.
# Default: 'Dockerfile'.
dockerfile: build/docker/Dockerfile
# Set the "backend" for the Docker pipe.
# Valid options are: docker, buildx, podman.
# Podman is a GoReleaser Pro feature and is only available on Linux.
# Default: 'docker'.
use: buildx
# Docker build flags.
# Templates: allowed.
build_flag_templates:
# Conditionally set Docker Buildx output to local (type=docker) if DRY_RUN=true, otherwise pushes to a registry (type=registry).
- '--output={{ if eq .Env.DRY_RUN "true" }}type=docker{{ else }}type=registry{{ end }}'
# Enables maximum provenance attestation for the Docker Buildx build, generating detailed build metadata for supply chain security.
- --attest=type=provenance,mode=max
# Generates a Software Bill of Materials (SBOM) attestation for the Docker Buildx build, documenting the software components in the image.
- --attest=type=sbom
# Specifies the target platform for the Docker image as Linux on ARMv6 architecture.
- "--platform=linux/arm/v6"
# Sets the Go build environment variable GOOS to linux, indicating the target operating system for the Go binary.
- "--build-arg=GOOS=linux"
# Sets the Go build environment variable GOARCH to ARM, indicating the target architecture for the Go binary.
- "--build-arg=GOARCH=arm"
# Specifies the name of the image
- "--label=org.opencontainers.image.name={{ .ProjectName }}"
# Records the image creation timestamp
- "--label=org.opencontainers.image.created={{ .Date }}"
# Indicates the version of the software in the image
- "--label=org.opencontainers.image.version={{ .Version }}"
# Tracks the exact Git commit SHA used to build the image
- "--label=org.opencontainers.image.revision={{ .FullCommit }}"
# Points to the source repository URL
- "--label=org.opencontainers.image.source={{ .GitURL }}"
- ##################################################################################################
# shoutrrr:arm64v8
##################################################################################################
# GOOS of the built binaries/packages that should be used.
goos: linux
# GOARCH of the built binaries/packages that should be used.
goarch: arm64
# GOARM of the built binaries/packages that should be used.
# Default: '6'.
# Templates of the Docker image names.
# Templates: allowed.
image_templates:
- nickfedor/shoutrrr:arm64v8-dev
- ghcr.io/nicholas-fedor/shoutrrr:arm64v8-dev
# Path to the Dockerfile (from the project root).
# Templates: allowed.
# Default: 'Dockerfile'.
dockerfile: build/docker/Dockerfile
# Set the "backend" for the Docker pipe.
# Valid options are: docker, buildx, podman.
# Podman is a GoReleaser Pro feature and is only available on Linux.
# Default: 'docker'.
use: buildx
# Docker build flags.
# Templates: allowed.
build_flag_templates:
# Conditionally set Docker Buildx output to local (type=docker) if DRY_RUN=true, otherwise pushes to a registry (type=registry).
- '--output={{ if eq .Env.DRY_RUN "true" }}type=docker{{ else }}type=registry{{ end }}'
# Enables maximum provenance attestation for the Docker Buildx build, generating detailed build metadata for supply chain security.
- --attest=type=provenance,mode=max
# Generates a Software Bill of Materials (SBOM) attestation for the Docker Buildx build, documenting the software components in the image.
- --attest=type=sbom
# Specifies the target platform for the Docker image as Linux on ARM64 architecture.
- "--platform=linux/arm64"
# Sets the Go build environment variable GOOS to linux, indicating the target operating system for the Go binary.
- "--build-arg=GOOS=linux"
# Sets the Go build environment variable GOARCH to arm64, indicating the target architecture for the Go binary.
- "--build-arg=GOARCH=arm64"
# Specifies the name of the image
- "--label=org.opencontainers.image.name={{ .ProjectName }}"
# Records the image creation timestamp
- "--label=org.opencontainers.image.created={{ .Date }}"
# Indicates the version of the software in the image
- "--label=org.opencontainers.image.version={{ .Version }}"
# Tracks the exact Git commit SHA used to build the image
- "--label=org.opencontainers.image.revision={{ .FullCommit }}"
# Points to the source repository URL
- "--label=org.opencontainers.image.source={{ .GitURL }}"
- ##################################################################################################
# shoutrrr:riscv64
##################################################################################################
# GOOS of the built binaries/packages that should be used.
# Default: 'linux'.
goos: linux
# GOARCH of the built binaries/packages that should be used.
goarch: riscv64
# Templates of the Docker image names.
# Templates: allowed.
image_templates:
- nickfedor/shoutrrr:riscv64-dev
- ghcr.io/nicholas-fedor/shoutrrr:riscv64-dev
# Path to the Dockerfile (from the project root).
# Templates: allowed.
# Default: 'Dockerfile'
dockerfile: build/docker/Dockerfile
# Set the "backend" for the Docker pipe.
# Valid options are: docker, buildx, podman.
# Podman is a GoReleaser Pro feature and is only available on Linux.
# Default: 'docker'.
use: buildx
# Docker build flags.
# Templates: allowed.
build_flag_templates:
# Conditionally set Docker Buildx output to local (type=docker) if DRY_RUN=true, otherwise pushes to a registry (type=registry).
- '--output={{ if eq .Env.DRY_RUN "true" }}type=docker{{ else }}type=registry{{ end }}'
# Enables maximum provenance attestation for the Docker Buildx build, generating detailed build metadata for supply chain security.
- --attest=type=provenance,mode=max
# Generates a Software Bill of Materials (SBOM) attestation for the Docker Buildx build, documenting the software components in the image.
- --attest=type=sbom
# Specifies the target platform for the Docker image as Linux on RISCv64 architecture.
- "--platform=linux/riscv64"
# Sets the Go build environment variable GOOS to linux, indicating the target operating system for the Go binary.
- "--build-arg=GOOS=linux"
# Sets the Go build environment variable GOARCH to riscv64, indicating the target architecture for the Go binary.
- "--build-arg=GOARCH=riscv64"
# Specifies the name of the image
- "--label=org.opencontainers.image.name={{ .ProjectName }}"
# Records the image creation timestamp
- "--label=org.opencontainers.image.created={{ .Date }}"
# Indicates the version of the software in the image
- "--label=org.opencontainers.image.version={{ .Version }}"
# Tracks the exact Git commit SHA used to build the image
- "--label=org.opencontainers.image.revision={{ .FullCommit }}"
# Points to the source repository URL
- "--label=org.opencontainers.image.source={{ .GitURL }}"
######################################################################################################
|