Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 39 additions & 18 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
version: 2
before:
hooks:
- go mod download
# you may remove this if you don't need go generate
- go generate ./...
- go mod verify
project_name: cortextool
builds:
- id: cortextool-darwin
Expand All @@ -11,6 +10,8 @@ builds:
binary: cortextool
env:
- CGO_ENABLED=0
flags:
- -mod=vendor
main: ./cmd/cortextool/main.go
goos:
- darwin
Expand All @@ -23,6 +24,8 @@ builds:
binary: cortextool
env:
- CGO_ENABLED=0
flags:
- -mod=vendor
main: ./cmd/cortextool/main.go
goos:
- linux
Expand All @@ -34,6 +37,8 @@ builds:
binary: cortextool
env:
- CGO_ENABLED=0
flags:
- -mod=vendor
main: ./cmd/cortextool/main.go
goos:
- windows
Expand All @@ -46,6 +51,8 @@ builds:
binary: benchtool
env:
- CGO_ENABLED=0
flags:
- -mod=vendor
main: ./cmd/benchtool/
goos:
- darwin
Expand All @@ -58,6 +65,8 @@ builds:
binary: benchtool
env:
- CGO_ENABLED=0
flags:
- -mod=vendor
main: ./cmd/benchtool/
goos:
- linux
Expand All @@ -69,39 +78,53 @@ builds:
binary: benchtool
env:
- CGO_ENABLED=0
flags:
- -mod=vendor
main: ./cmd/benchtool/
goos:
- windows
goarch:
- amd64
- 386
archives:
- replacements:
darwin: mac-os
linux: linux
windows: windows
386: i386
amd64: x86_64
- id: cortextool
ids:
- cortextool-darwin
- cortextool-linux
- cortextool-windows
name_template: >-
{{ .Binary }}_{{ .Version }}_{{ if eq .Os "darwin" }}mac-os{{ else }}{{ .Os }}{{ end }}_{{ if eq .Arch "amd64" }}x86_64{{ else if eq .Arch "386" }}i386{{ else }}{{ .Arch }}{{ end }}
format_overrides:
- goos: windows
formats: [zip]
files:
- none*
formats: [binary]
- id: benchtool
ids:
- benchtool-darwin
- benchtool-linux
- benchtool-windows
name_template: >-
{{ .Binary }}_{{ .Version }}_{{ if eq .Os "darwin" }}mac-os{{ else }}{{ .Os }}{{ end }}_{{ if eq .Arch "amd64" }}x86_64{{ else if eq .Arch "386" }}i386{{ else }}{{ .Arch }}{{ end }}
format_overrides:
- goos: windows
format: zip
formats: [zip]
files:
- none*
format: binary
formats: [binary]
checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "{{ .Tag }}-next"
version_template: "{{ .Tag }}-next"
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
dockers:
- goos: linux
goarch: amd64
ids:
- ids:
- cortextool-linux
dockerfile: cmd/cortextool/GR.Dockerfile
image_templates:
Expand All @@ -114,9 +137,7 @@ dockers:
- "--label=org.opencontainers.image.version={{.Version}}"
- "--label=repository=https://github.com/cortexproject/cortex-tools"
- "--label=homepage=https://cortexmetrics.io"
- goos: linux
goarch: amd64
ids:
- ids:
- benchtool-linux
dockerfile: cmd/benchtool/GR.Dockerfile
image_templates:
Expand Down
2 changes: 1 addition & 1 deletion RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ $ git tag -s "${tag}" -m "${tag}"
$ git push origin "${tag}"
```

3. Run `$ goreleaser release --release-notes=changelogs/v0.3.0.md --rm-dist` where the changelog file is the one created as part of step 1.
3. Run `$ goreleaser release --release-notes=changelogs/v0.3.0.md --clean` where the changelog file is the one created as part of step 1.
4. The docker image will be pushed automatically.


Expand Down
Loading