-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy path.goreleaser.yaml
60 lines (55 loc) · 2.14 KB
/
.goreleaser.yaml
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
project_name: rewinged
builds:
- id: windows
hooks:
pre:
- ./template-versioninfo.sh '{{ time "2006" }}' "{{ .Version }}" "{{ .Major }}" "{{ .Minor }}" "{{ .Patch }}"
- go generate # creates versioninfo resource file used by windows build
ldflags:
- -s -w # do not include debug symbols in executables
- -X 'main.version={{.Version}}' # set version information in-program
- -X 'main.commit={{.ShortCommit}}' # set commit information in-program
- -X 'main.compileTime={{.Date}}' # set timestamp information in-program
- -X 'main.releaseMode=true' # set gin to releaseMode
goos: [windows]
goarch: [amd64]
goamd64: [v1]
- id: linux
ldflags:
- -s -w # do not include debug symbols in executables
- -X 'main.version={{.Version}}' # set version information in-program
- -X 'main.commit={{.ShortCommit}}' # set commit information in-program
- -X 'main.compileTime={{.Date}}' # set timestamp information in-program
- -X 'main.releaseMode=true' # set gin to releaseMode
env: [CGO_ENABLED=0]
goos: [linux]
goarch: [amd64]
goamd64: [v1]
archives:
- format: zip
changelog:
filters:
exclude:
- '^(?i)ci:'
- '^(?i)readme:'
release:
name_template: "Version {{.Version}}"
prerelease: auto
draft: true
dockers:
- use: buildx
ids: [linux]
dockerfile: Dockerfile.goreleaser
image_templates:
- ghcr.io/jantari/rewinged:latest
- ghcr.io/jantari/rewinged:{{.Version}}
- "{{ if not .Prerelease }}ghcr.io/jantari/rewinged:stable{{ end }}"
build_flag_templates:
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.version={{.Version}}"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.title=rewinged"
- "--label=org.opencontainers.image.description=rewinged is a self-hosted winget package source"
- "--label=org.opencontainers.image.url=github.com/jantari/rewinged"
- "--label=org.opencontainers.image.source=github.com/jantari/rewinged"
- "--label=org.opencontainers.image.licenses=MIT"