-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.goreleaser.yaml
130 lines (121 loc) · 3.3 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
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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
---
project_name: dashboard
version: 2
release:
github:
owner: n3tuk
name: dashboard
name_template: |-
{{ .Version }}
changelog:
disable: true
snapshot:
version_template: >-
{{ incpatch .Version }}~d{{ .Now.Format "0601021504" }}
checksum:
name_template: |-
dashboard-sha512
algorithm: sha3-512
builds:
- id: dashboard
main: main.go
binary: dashboard
mod_timestamp: '{{ .CommitTimestamp }}'
env:
- CGO_ENABLED=0
ldflags: >-
-s -w
-X 'main.Branch={{ .Branch }}'
-X 'main.Commit={{ .ShortCommit }}'
-X 'main.Version={{ .Version }}'
-X 'main.BuildDate={{ .Date }}'
-X 'main.Architecture={{ .Runtime.Goarch }}'
asmflags: >-
all=-trimpath=.
gcflags: >-
all=-trimpath=.
goos:
- 'linux'
- 'darwin'
- 'windows'
goarch:
- 'arm64'
- 'amd64'
goarm:
- '7'
goamd64:
- 'v3'
ignore:
- goos: darwin
goarch: amd64
archives:
- id: archive
name_template: |-
{{ .ProjectName }}-v{{ .Version }}-{{ tolower .Os }}-{{ tolower .Arch }}
format: zip
builds_info:
group: root
owner: root
mode: 0755
mtime: 2006-01-02T15:04:05Z
files:
- LICENSE
dockers:
- id: amd64
goarch: amd64
goamd64: v3
image_templates:
- ghcr.io/n3tuk/dashboard:{{ .ShortCommit }}-amd64
dockerfile: Dockerfile
use: docker
skip_push: false
build_flag_templates:
- --platform=linux/amd64
- --label=org.opencontainers.image.created={{ .Date }}
- --label=org.opencontainers.image.version={{ .Version }}
- --label=org.opencontainers.image.revision={{ .FullCommit }}
- id: arm64
goarch: arm64
goarm: 7
image_templates:
- ghcr.io/n3tuk/dashboard:{{ .ShortCommit }}-arm64
dockerfile: Dockerfile
use: docker
skip_push: false
build_flag_templates:
- --platform=linux/arm64
- --label=org.opencontainers.image.created={{ .Date }}
- --label=org.opencontainers.image.version={{ .Version }}
- --label=org.opencontainers.image.revision={{ .FullCommit }}
# Build a set of manifests based on all the ways the GitHub Action could be
# called, including as the main branch, both short and long commit IDs, and each of
# Major, Major/Minor, and Major/Minor/Patch versions being tagged
docker_manifests:
- id: latest
name_template: ghcr.io/n3tuk/dashboard:latest
use: docker
skip_push: auto
image_templates:
- ghcr.io/n3tuk/dashboard:{{ .ShortCommit }}-amd64
- ghcr.io/n3tuk/dashboard:{{ .ShortCommit }}-arm64
- id: major
name_template: ghcr.io/n3tuk/dashboard:v{{ .Major }}
use: docker
skip_push: auto
image_templates:
- ghcr.io/n3tuk/dashboard:{{ .ShortCommit }}-amd64
- ghcr.io/n3tuk/dashboard:{{ .ShortCommit }}-arm64
- id: version
name_template: ghcr.io/n3tuk/dashboard:v{{ .Version }}
use: docker
skip_push: auto
image_templates:
- ghcr.io/n3tuk/dashboard:{{ .ShortCommit }}-amd64
- ghcr.io/n3tuk/dashboard:{{ .ShortCommit }}-arm64
- id: commit
name_template: ghcr.io/n3tuk/dashboard:{{ .ShortCommit }}
use: docker
skip_push: false
image_templates:
- ghcr.io/n3tuk/dashboard:{{ .ShortCommit }}-amd64
- ghcr.io/n3tuk/dashboard:{{ .ShortCommit }}-arm64