forked from labring/sealos
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.goreleaser.yml
165 lines (155 loc) · 3.75 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
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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
project_name: sealos
#gomod:
# # Proxy a module from proxy.golang.org, making the builds verifiable.
# # This will only be effective if running against a tag. Snapshots will ignore this setting.
# # Notice: for this to work your `build.main` must be a package, not a `.go` file.
# #
# # Default is false.
# proxy: true
#
# # If proxy is true, use these environment variables when running `go mod` commands (namely, `go mod tidy`).
# # Defaults to `os.Environ()`.
# env:
# - GOPROXY=https://goproxy.cn
before:
hooks:
- make clean
- go mod tidy
builds:
- id: sealos
env:
- CGO_ENABLED=1
- CC=aarch64-linux-gnu-gcc
main: ./cmd/sealos
binary: sealos
hooks:
post: upx "{{ .Path }}"
goos:
- linux
goarch:
- arm64
- amd64
flags:
- -trimpath
tags:
- containers_image_openpgp
- netgo
- exclude_graphdriver_devicemapper
- static
- osusergo
- exclude_graphdriver_btrfs
ldflags:
- -X github.com/labring/sealos/pkg/version.gitVersion={{.Version}}
- -X github.com/labring/sealos/pkg/version.gitCommit={{.ShortCommit}}
- -X github.com/labring/sealos/pkg/version.buildDate={{.Date}}
- -s -w
overrides:
- goos: linux
goarch: amd64
goamd64: v1
goarm: ""
gomips: ""
env:
- CGO_ENABLED=1
- CC=x86_64-linux-gnu-gcc
- id: sealctl
env:
- CGO_ENABLED=0
main: ./cmd/sealctl
hooks:
post: upx "{{ .Path }}"
binary: sealctl
goos:
- linux
goarch:
- arm64
- amd64
flags:
- -trimpath
ldflags:
- -X github.com/labring/sealos/pkg/version.gitVersion={{.Version}}
- -X github.com/labring/sealos/pkg/version.gitCommit={{.ShortCommit}}
- -X github.com/labring/sealos/pkg/version.buildDate={{.Date}}
- -s -w
- id: lvscare
env:
- CGO_ENABLED=0
main: ./cmd/lvscare
hooks:
post: upx "{{ .Path }}"
binary: lvscare
goos:
- linux
goarch:
- arm64
- amd64
flags:
- -trimpath
ldflags:
- -X github.com/labring/sealos/pkg/version.gitVersion={{.Version}}
- -X github.com/labring/sealos/pkg/version.gitCommit={{.ShortCommit}}
- -X github.com/labring/sealos/pkg/version.buildDate={{.Date}}
- -s -w
- id: image-cri-shim
env:
- CGO_ENABLED=0
main: ./cmd/image-cri-shim
hooks:
post: upx "{{ .Path }}"
binary: image-cri-shim
goos:
- linux
goarch:
- arm64
- amd64
flags:
- -trimpath
ldflags:
- -X github.com/labring/sealos/pkg/version.gitVersion={{.Version}}
- -X github.com/labring/sealos/pkg/version.gitCommit={{.ShortCommit}}
- -X github.com/labring/sealos/pkg/version.buildDate={{.Date}}
- -s -w
release:
# github:
# name: sealos
prerelease: auto
nfpms:
- id: packages
builds:
- sealos
vendor: labring
homepage: https://github.com/labring/sealos
maintainer: fanux (https://github.com/fanux)
description: Cloud OS distribution with Kubernetes as kernel
license: Apache 2.0
formats:
- deb
- rpm
publishers:
- name: "fury.io"
ids:
- packages
dir: "{{ dir .ArtifactPath }}"
cmd: |
curl -F package=@{{ .ArtifactName }} https://{{ .Env.FURY_TOKEN }}@push.fury.io/{{ .Env.USERNAME }}/
checksum:
disable: true
name_template: "{{ .ProjectName }}_checksums.txt"
snapshot:
name_template: "{{ .Tag }}-next"
changelog:
use: github
sort: asc
groups:
- title: Features
regexp: "^.*feat[(\\w)]*:+.*$"
order: 0
- title: "Bug fixes"
regexp: "^.*fix[(\\w)]*:+.*$"
order: 1
- title: Others
order: 999
filters:
exclude:
- "^docs:"
- "^test:"