refactor: goreleaser config
parent
0861890120
commit
bc93c09571
|
@ -10,9 +10,9 @@ before:
|
||||||
- go mod tidy
|
- go mod tidy
|
||||||
- go generate ./...
|
- go generate ./...
|
||||||
signs:
|
signs:
|
||||||
- signature: "{{ .ProjectName }}_SHA256SUMS.gpg"
|
- signature: "myproject_SHA256SUMS.gpg"
|
||||||
artifacts: all
|
artifacts: checksum
|
||||||
args: ["-u", "{{ .Env.GPG_FINGERPRINT }}", "--output", "${signature}", "--detach-sign", "${artifact}"]
|
args: [ "--batch", "-u", "{{ .Env.GPG_FINGERPRINT }}", "--output", "${signature}", "--detach-sign", "${artifact}" ]
|
||||||
builds:
|
builds:
|
||||||
- id: "myproject-build"
|
- id: "myproject-build"
|
||||||
binary: myproject
|
binary: myproject
|
||||||
|
@ -29,9 +29,9 @@ builds:
|
||||||
- arm
|
- arm
|
||||||
- arm64
|
- arm64
|
||||||
- 386
|
- 386
|
||||||
ldflags: -s -w -X github.com/sundowndev/goreleaser-template.version={{.Version}}
|
ldflags: "-X github.com/sundowndev/goreleaser-template.version={{.Version}}"
|
||||||
archives:
|
archives:
|
||||||
- name_template: '{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}'
|
- name_template: '{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}'
|
||||||
format: binary
|
format: binary
|
||||||
replacements:
|
replacements:
|
||||||
armv6: arm
|
armv6: arm
|
||||||
|
@ -43,7 +43,9 @@ checksum:
|
||||||
snapshot:
|
snapshot:
|
||||||
name_template: "{{ .Tag }}-next"
|
name_template: "{{ .Tag }}-next"
|
||||||
dockers:
|
dockers:
|
||||||
- image_templates: ["sundowndev/goreleaser-template:{{ .Version }}"]
|
- image_templates:
|
||||||
|
- "sundowndev/goreleaser-template:{{ .Version }}"
|
||||||
|
- "sundowndev/goreleaser-template:{{ .Tag }}"
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
build_flag_templates:
|
build_flag_templates:
|
||||||
- --label=org.opencontainers.image.title={{ .ProjectName }}
|
- --label=org.opencontainers.image.title={{ .ProjectName }}
|
||||||
|
@ -54,8 +56,9 @@ dockers:
|
||||||
- --label=org.opencontainers.image.created={{ time "2006-01-02T15:04:05Z07:00" }}
|
- --label=org.opencontainers.image.created={{ time "2006-01-02T15:04:05Z07:00" }}
|
||||||
- --label=org.opencontainers.image.revision={{ .FullCommit }}
|
- --label=org.opencontainers.image.revision={{ .FullCommit }}
|
||||||
- --label=org.opencontainers.image.licenses=MIT
|
- --label=org.opencontainers.image.licenses=MIT
|
||||||
|
- --platform=linux/arm64
|
||||||
nfpms:
|
nfpms:
|
||||||
- maintainer: sundowndev <raphael@crvx.fr>
|
- maintainer: sundowndev <raphael@crvx.fr>
|
||||||
description: sample project
|
description: sample project
|
||||||
homepage: https://github.com/sundowndev/goreleaser-template
|
homepage: https://github.com/sundowndev/goreleaser-template
|
||||||
license: MIT
|
license: MIT
|
||||||
|
|
Loading…
Reference in New Issue