-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy path.goreleaser.yml
75 lines (68 loc) · 2.01 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
73
74
75
version: 1
before:
hooks:
- go mod tidy
builds:
- env:
- CGO_ENABLED=0
ldflags:
- "-s -w"
- -X 'github.com/{{.Env.GITHUB_REPOSITORY}}/cmd.Version={{.Version}}'
- -X 'github.com/{{.Env.GITHUB_REPOSITORY}}/cmd.Commit={{.FullCommit}}'
- -X 'github.com/{{.Env.GITHUB_REPOSITORY}}/cmd.RepoUrl={{.GitURL}}'
- -X 'github.com/{{.Env.GITHUB_REPOSITORY}}/cmd.BuildDate={{.Date}}'
- -X 'github.com/{{.Env.GITHUB_REPOSITORY}}/cmd.BuiltWithGoVersion={{.Env.GOLANG_VERSION}}'
- -X 'github.com/{{.Env.GITHUB_REPOSITORY}}/cmd.BuiltBy={{.Env.BUILT_BY}}'
goos:
- linux
- windows
- darwin
goarch:
- amd64
- arm64
archives:
- wrap_in_directory: false
format: tar.gz
format_overrides:
- goos: windows
format: zip
checksum:
name_template: "checksums.txt"
changelog:
sort: asc
filters:
exclude:
- "^docs:"
- "^test:"
release:
draft: true
prerelease: auto
name_template: "{{.ProjectName}}-v{{.Version}}-{{.Date}}"
dockers:
- use: buildx
goos: linux
goarch: amd64
dockerfile: Dockerfile
image_templates:
- "ghcr.io/cxjava/{{ .ProjectName }}:{{ .Version }}-amd64"
- "ghcr.io/cxjava/{{ .ProjectName }}:latest-amd64"
build_flag_templates:
- --platform=linux/amd64
- use: buildx
goos: linux
goarch: arm64
dockerfile: Dockerfile
image_templates:
- "ghcr.io/cxjava/{{ .ProjectName }}:{{ .Version }}-arm64v8"
- "ghcr.io/cxjava/{{ .ProjectName }}:latest-arm64v8"
build_flag_templates:
- --platform=linux/arm64/v8
docker_manifests:
- name_template: ghcr.io/cxjava/{{ .ProjectName }}:{{ .Version }}
image_templates:
- ghcr.io/cxjava/{{ .ProjectName }}:{{ .Version }}-amd64
- ghcr.io/cxjava/{{ .ProjectName }}:{{ .Version }}-arm64v8
- name_template: ghcr.io/cxjava/{{ .ProjectName }}:latest
image_templates:
- ghcr.io/cxjava/{{ .ProjectName }}:{{ .Version }}-amd64
- ghcr.io/cxjava/{{ .ProjectName }}:{{ .Version }}-arm64v8