This repository has been archived by the owner on Oct 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
.goreleaser.yml
72 lines (72 loc) · 2.59 KB
/
.goreleaser.yml
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
before:
hooks:
- go mod download
env:
- GO111MODULE=on
builds:
- main: ./cmd/seed/main.go
mod_timestamp: "{{ .CommitTimestamp }}"
env:
- CGO_ENABLED=0
flags:
- -trimpath
ldflags:
- -s -w
- -X {{.Env.GOMODULENAME}}/pkg/version.version={{.Version}}
- -X {{.Env.GOMODULENAME}}/pkg/version.major={{.Major}}
- -X {{.Env.GOMODULENAME}}/pkg/version.minor={{.Minor}}
- -X {{.Env.GOMODULENAME}}/pkg/version.patch={{.Patch}}
- -X {{.Env.GOMODULENAME}}/pkg/version.revision={{.FullCommit}}
- -X {{.Env.GOMODULENAME}}/pkg/version.commitDate={{.CommitDate}}
- -X {{.Env.GOMODULENAME}}/pkg/version.branch={{.Branch}}
- -X {{.Env.GOMODULENAME}}/pkg/version.gitTreeState={{.Env.GIT_TREE_STATE}}
- -X {{.Env.GOMODULENAME}}/pkg/version.builtBy=goreleaser
goos:
- darwin
- linux
- windows
goarch:
- amd64
- arm64
dockers:
- image_templates:
- "{{.Env.DOCKER_REPOSITORY}}/{{.ProjectName}}:{{ .Tag }}-amd64"
dockerfile: Dockerfile
use_buildx: true
build_flag_templates:
- "--pull"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.name={{.ProjectName}}"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
- "--label=org.opencontainers.image.source={{.GitURL}}"
- "--platform=linux/amd64"
- image_templates:
- "{{.Env.DOCKER_REPOSITORY}}/{{.ProjectName}}:{{ .Tag }}-arm64"
dockerfile: Dockerfile
# Using buildx can result in outdated builds when buildx would incorrectly
# use cached build layers for updated artifacts. Until the issue is resolved
# we cannot reliably use buildx for builds.
# https://github.com/moby/buildkit/issues/1368
use_buildx: false
build_flag_templates:
- "--pull"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.name={{.ProjectName}}"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
- "--label=org.opencontainers.image.source={{.GitURL}}"
- "--platform=linux/arm64"
goarch: arm64
docker_manifests:
- name_template: "{{.Env.DOCKER_REPOSITORY}}/{{.ProjectName}}:{{ .Tag }}"
image_templates:
- "{{.Env.DOCKER_REPOSITORY}}/{{.ProjectName}}:{{ .Tag }}-amd64"
- "{{.Env.DOCKER_REPOSITORY}}/{{.ProjectName}}:{{ .Tag }}-arm64"
archives:
- format_overrides:
- goos: windows
format: zip
release:
github:
prerelease: auto