-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.goreleaser.yml
More file actions
103 lines (96 loc) · 3.58 KB
/
Copy path.goreleaser.yml
File metadata and controls
103 lines (96 loc) · 3.58 KB
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
# To test / verify
# macOS / Linux:
# $ docker run -ti -v "$PWD:$PWD" -w "$PWD" goreleaser/goreleaser:latest release --snapshot --clean
# windows (Git bash):
# $ MSYS_NO_PATHCONV=1 docker run -ti -v "$PWD:$PWD" -w "$PWD" goreleaser/goreleaser:latest release --snapshot --clean
project_name: smash
before:
hooks:
- go mod download
release:
name_template: "{{.ProjectName}}-v{{.Version}}"
draft: false
prerelease: auto
make_latest: true
snapshot:
name_template: '{{ incpatch .Version }}-{{.ShortCommit}}'
builds:
- env:
- CGO_ENABLED=0
goarch:
- amd64
- arm64
goamd64:
# https://github.com/golang/go/wiki/MinimumRequirements#amd64
- v1
goos:
- darwin
- freebsd
- linux
- windows
flags:
- -trimpath
ldflags:
- -s -w
- -X "github.com/thushan/smash/internal/smash.Version=v{{.Version}}"
- -X "github.com/thushan/smash/internal/smash.Commit={{.Commit}}"
- -X "github.com/thushan/smash/internal/smash.Date={{.CommitDate}}"
- -X "github.com/thushan/smash/internal/smash.User=goreleaser"
checksum:
name_template: "checksums.txt"
archives:
- files:
- LICENSE
format_overrides:
- goos: windows
format: zip
- goos: darwin
format: zip
name_template: >-
{{ .ProjectName }}_v{{- .Version }}_{{- if eq .Os "darwin" }}macos_{{- else }}{{ .Os }}_{{ end }}{{- .Arch }}
changelog:
sort: asc
filters:
exclude:
- "^Merge"
dockers:
- image_templates:
- "ghcr.io/thushan/{{ .ProjectName }}:{{ .Version }}-amd64"
- "ghcr.io/thushan/{{ .ProjectName }}:latest-amd64"
use: buildx
dockerfile: Dockerfile
build_flag_templates:
- "--platform=linux/amd64"
- "--label=org.opencontainers.image.title={{ .ProjectName }}"
- "--label=org.opencontainers.image.description=Fast duplicate file finder"
- "--label=org.opencontainers.image.url=https://github.com/thushan/{{ .ProjectName }}"
- "--label=org.opencontainers.image.source=https://github.com/thushan/{{ .ProjectName }}"
- "--label=org.opencontainers.image.version={{ .Version }}"
- "--label=org.opencontainers.image.created={{ .Date }}"
- "--label=org.opencontainers.image.revision={{ .FullCommit }}"
- "--label=org.opencontainers.image.licenses=Apache-2.0"
- image_templates:
- "ghcr.io/thushan/{{ .ProjectName }}:{{ .Version }}-arm64"
- "ghcr.io/thushan/{{ .ProjectName }}:latest-arm64"
use: buildx
dockerfile: Dockerfile
build_flag_templates:
- "--platform=linux/arm64"
- "--label=org.opencontainers.image.title={{ .ProjectName }}"
- "--label=org.opencontainers.image.description=Fast duplicate file finder"
- "--label=org.opencontainers.image.url=https://github.com/thushan/{{ .ProjectName }}"
- "--label=org.opencontainers.image.source=https://github.com/thushan/{{ .ProjectName }}"
- "--label=org.opencontainers.image.version={{ .Version }}"
- "--label=org.opencontainers.image.created={{ .Date }}"
- "--label=org.opencontainers.image.revision={{ .FullCommit }}"
- "--label=org.opencontainers.image.licenses=Apache-2.0"
goarch: arm64
docker_manifests:
- name_template: "ghcr.io/thushan/{{ .ProjectName }}:{{ .Version }}"
image_templates:
- "ghcr.io/thushan/{{ .ProjectName }}:{{ .Version }}-amd64"
- "ghcr.io/thushan/{{ .ProjectName }}:{{ .Version }}-arm64"
- name_template: "ghcr.io/thushan/{{ .ProjectName }}:latest"
image_templates:
- "ghcr.io/thushan/{{ .ProjectName }}:latest-amd64"
- "ghcr.io/thushan/{{ .ProjectName }}:latest-arm64"