-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.goreleaser.yml
75 lines (72 loc) · 2.2 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
# Check the documentation at http://goreleaser.com
before:
hooks:
# You may remove this if you don't use go modules.
- go mod download
# you may remove this if you don't need go generate
- go generate ./...
builds:
- env:
- CGO_ENABLED=0
# Custom ldflags templates.
# Default is `-s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}} -X main.builtBy=goreleaser`.
ldflags:
- -s -w -X github.com/jimschubert/labeler/cmd/labeler.version={{ .Version }} -X github.com/jimschubert/labeler/cmd/labeler.commit={{ .ShortCommit }} -X github.com/jimschubert/labeler/cmd/labeler.date={{ .Date }} -X github.com/jimschubert/labeler/cmd/labeler.projectName={{ .ProjectName }}
goos:
- darwin
- linux
- windows
goarch:
- amd64
- '386'
- arm
- arm64
ignore:
- goos: darwin
goarch: '386'
- goos: windows
goarch: '386'
# Path to main.go file or main package.
# Default is `.`.
main: ./cmd/main.go
archives:
- rlcp: true
name_template: >-
{{ .ProjectName }}_
{{- title .Os }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}{{ end }}
format: tar.gz
format_overrides:
- goos: windows
format: zip
files:
- LICENSE
- README.md
checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "{{ .Tag }}-next"
changelog:
sort: desc
filters:
exclude:
- '^doc[s]?:'
- '^\[doc[s]?\]'
- '^wip:'
- '^WIP:'
dockers:
- goos: linux
goarch: '386'
image_templates:
- "docker.pkg.github.com/jimschubert/labeler/labeler:latest"
- "docker.pkg.github.com/jimschubert/labeler/labeler:{{ .Tag }}"
# - "docker.pkg.github.com/jimschubert/labeler/labeler:v{{ .Major }}"
dockerfile: release.Dockerfile
build_flag_templates:
- "--label=org.opencontainers.image.created={{ .Date }}"
- "--label=org.opencontainers.image.name={{ .ProjectName }}"
- "--label=org.opencontainers.image.revision={{ .FullCommit }}"
- "--label=org.opencontainers.image.version={{ .Version }}"
- "--build-arg=APP_NAME={{ .ProjectName }}"