go-pingbot/.goreleaser.yml

66 lines
1.2 KiB
YAML

project_name: pingbot
before:
hooks:
- go mod tidy
builds:
- main: ./cmd/pingbot
binary: '{{ .ProjectName }}.out'
goos:
- linux
- freebsd
goarch:
- amd64
- arm64
ldflags:
- -s -w
- -X github.com/medzikuser/go-pingbot/config.Version={{ .RawVersion }}
- -X github.com/medzikuser/go-pingbot/config.Build={{ .Date }}
archives:
- format: tar.xz
files:
- schema.env
- config.schema.toml
- README.md
- LICENSE
- start.sh
checksum:
name_template: 'checksums.txt'
algorithm: sha256
dockers:
- id: amd64
goos: linux
goarch: amd64
goarm: ''
image_templates:
- "medzik/pingbot:latest"
- "medzik/pingbot:{{ .Tag }}"
- "medzik/pingbot:v{{ .Major }}"
- "medzik/pingbot:v{{ .Major }}.{{ .Minor }}"
dockerfile: Dockerfile
use: docker
build_flag_templates:
- "--pull"
- "--label=org.opencontainers.image.created={{ .Date }}"
- "--label=org.opencontainers.image.title={{ .ProjectName }}"
- "--label=org.opencontainers.image.revision={{ .FullCommit }}"
- "--label=org.opencontainers.image.version={{ .Version }}"
extra_files:
- start.sh