-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.goreleaser.yaml
More file actions
78 lines (70 loc) · 2.25 KB
/
.goreleaser.yaml
File metadata and controls
78 lines (70 loc) · 2.25 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
# GoReleaser configuration
# Documentation: https://goreleaser.com
before:
hooks:
- go mod tidy
- go generate ./...
builds:
- main: ./cmd/notes-api
binary: notes-api
env:
- CGO_ENABLED=0
goos:
- linux
- windows
- darwin
goarch:
- amd64
- arm64
ldflags:
- -s -w
- -X notes-api/internal/version.Version={{.Version}}
- -X notes-api/internal/version.Commit={{.Commit}}
- -X notes-api/internal/version.BuildTime={{.Date}}
archives:
- format: tar.gz
# this name template makes the OS and Arch compatible with the results of uname.
name_template: >-
{{ .ProjectName }}_
{{- title .Os }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}{{ end }}
{{- if .Arm }}v{{ .Arm }}{{ end }}
format_overrides:
- goos: windows
format: zip
dockers:
- image_templates:
- "ghcr.io/{{ .Env.GITHUB_REPOSITORY_OWNER }}/{{ .ProjectName }}:{{ .Version }}"
- "ghcr.io/{{ .Env.GITHUB_REPOSITORY_OWNER }}/{{ .ProjectName }}:latest"
dockerfile: deployments/Dockerfile
build_flag_templates:
- --label=org.opencontainers.image.title={{ .ProjectName }}
- --label=org.opencontainers.image.description=A clean, maintainable REST API for managing notes
- --label=org.opencontainers.image.url=https://github.com/{{ .Env.GITHUB_REPOSITORY }}
- --label=org.opencontainers.image.source=https://github.com/{{ .Env.GITHUB_REPOSITORY }}
- --label=org.opencontainers.image.version={{ .Version }}
- --label=org.opencontainers.image.created={{ time "2006-01-02T15:04:05Z07:00" }}
- --label=org.opencontainers.image.revision={{ .FullCommit }}
- --label=org.opencontainers.image.licenses=MIT
checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "{{ incpatch .Version }}-next"
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
- '^ci:'
- '^chore:'
- '^build:'
release:
github:
owner: "{{ .Env.GITHUB_REPOSITORY_OWNER }}"
name: "{{ .Env.GITHUB_REPOSITORY_NAME }}"
draft: false
prerelease: auto
name_template: "Release {{ .Tag }}"