-
Notifications
You must be signed in to change notification settings - Fork 152
/
.goreleaser.yml
75 lines (68 loc) · 1.52 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
version: 2
before:
hooks:
- go mod download
# We generate the flag file in the before hook, so that we can use it in blobs section
- sh -c "echo {{ .Version }} > scw-cli-v2-version"
builds:
- id: binaries
env:
- CGO_ENABLED=0
main: ./cmd/scw/main.go
goos:
- freebsd
- linux
- windows
- darwin
goarch:
- 386
- amd64
- arm64
ignore:
- goos: darwin
goarch: 386
ldflags:
- -s -w
- -X main.Version={{ .Version }}
- -X main.BuildDate={{ .Date }}
- -X main.GitBranch={{ .Branch }}
- -X main.GitCommit={{ .ShortCommit }}
archives:
- format: binary
checksum:
name_template: 'SHA256SUMS'
algorithm: sha256
changelog:
use: github
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
dockers:
- image_templates:
- "scaleway/cli:latest"
- "scaleway/cli:{{ .Tag }}"
- "scaleway/cli:{{ .Major }}"
- "scaleway/cli:{{ .Major }}.{{ .Minor }}"
extra_files:
- go.mod
- go.sum
- scripts
- cmd
- core
- commands
- internal
- .git
build_flag_templates:
- "--build-arg=VERSION={{ .Version }}"
release:
github:
owner: scaleway
name: scaleway-cli
# If set to auto, will mark the release as not ready for production
# in case there is an indicator for this in the tag e.g. v1.0.0-rc1
# If set to true, will mark the release as not ready for production.
prerelease: auto
draft: true
name_template: "{{ .Tag }}"