69 lines
2.0 KiB
YAML
69 lines
2.0 KiB
YAML
project_name: myproject
|
|
release:
|
|
github:
|
|
owner: sundowndev
|
|
name: goreleaser-template
|
|
draft: true
|
|
prerelease: auto
|
|
before:
|
|
hooks:
|
|
- go mod tidy
|
|
- go generate ./...
|
|
signs:
|
|
- signature: "myproject_SHA256SUMS.gpg"
|
|
artifacts: checksum
|
|
args: [ "--batch", "-u", "{{ .Env.GPG_FINGERPRINT }}", "--output", "${signature}", "--detach-sign", "${artifact}" ]
|
|
builds:
|
|
- id: "myproject-build"
|
|
binary: myproject
|
|
dir: .
|
|
env:
|
|
- CGO_ENABLED=0
|
|
- GO111MODULE=on
|
|
goos:
|
|
- linux
|
|
- windows
|
|
- darwin
|
|
goarch:
|
|
- amd64
|
|
- arm
|
|
- arm64
|
|
- 386
|
|
ldflags: "-X github.com/sundowndev/goreleaser-template.version={{.Version}}"
|
|
archives:
|
|
- name_template: '{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}'
|
|
format: binary
|
|
replacements:
|
|
armv6: arm
|
|
files:
|
|
- /tmp/myproject_SHA256SUMS.gpg
|
|
checksum:
|
|
name_template: '{{ .ProjectName }}_SHA256SUMS'
|
|
algorithm: sha256
|
|
snapshot:
|
|
name_template: "{{ .Tag }}-next"
|
|
dockers:
|
|
- image_templates:
|
|
- "sundowndev/goreleaser-template:{{ .Version }}"
|
|
- "sundowndev/goreleaser-template:{{ .Tag }}"
|
|
dockerfile: Dockerfile
|
|
build_flag_templates:
|
|
- --label=org.opencontainers.image.title={{ .ProjectName }}
|
|
- --label=org.opencontainers.image.description={{ .ProjectName }}
|
|
- --label=org.opencontainers.image.url=https://github.com/sundowndev/goreleaser-template
|
|
- --label=org.opencontainers.image.source=https://github.com/sundowndev/goreleaser-template
|
|
- --label=org.opencontainers.image.version={{ .Version }}
|
|
- --label=org.opencontainers.image.created={{ time "2006-01-02T15:04:05Z07:00" }}
|
|
- --label=org.opencontainers.image.revision={{ .FullCommit }}
|
|
- --label=org.opencontainers.image.licenses=MIT
|
|
- --platform=linux/arm64
|
|
nfpms:
|
|
- maintainer: sundowndev <raphael@crvx.fr>
|
|
description: sample project
|
|
homepage: https://github.com/sundowndev/goreleaser-template
|
|
license: MIT
|
|
formats:
|
|
- deb
|
|
- rpm
|
|
- apk
|