-
Notifications
You must be signed in to change notification settings - Fork 220
/
.goreleaser.yml
109 lines (94 loc) · 3.89 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
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
monorepo:
tag_prefix: v
builds:
- main: ./cmd/flipt/.
ldflags:
- -s -w -X main.version={{ .Version }} -X main.commit={{ .Commit }} -X main.date={{ .Date }} -X main.analyticsKey={{ .Env.ANALYTICS_KEY }}
- -linkmode external -extldflags -static
goos:
- linux
goarch:
- amd64
- arm64
flags:
- -tags=assets,netgo
- -trimpath
overrides:
- goos: linux
goarch: amd64
goamd64: v1
env:
- CGO_ENABLED=1
- CC=x86_64-linux-gnu-gcc
- goos: linux
goarch: arm64
env:
- CGO_ENABLED=1
- CC=aarch64-linux-gnu-gcc
release:
prerelease: auto # enable rc releases (e.g. v1.0.0-rc.1)
target_commitish: "{{ .Commit }}"
snapshot:
name_template: "{{ .ShortCommit }}-snapshot"
nightly:
# Default is `{{ incpatch .Version }}-{{ .ShortCommit }}-nightly`.
name_template: "{{ incpatch .Version }}-nightly"
sboms:
- artifacts: archive
archives:
- id: main
replacements:
amd64: x86_64
files:
- LICENSE
- README.md
- CHANGELOG.md
- ./config/default.yml
checksum:
name_template: "checksums.txt"
changelog:
skip: true
dockers:
- dockerfile: ./build/Dockerfile
use: buildx
goarch: amd64
image_templates:
- "{{ if .IsNightly }}flipt/flipt:v{{ incpatch .Version }}-nightly-amd64{{ else }}flipt/flipt:v{{ .Tag }}-amd64{{ end }}"
- "{{ if .IsNightly }}ghcr.io/flipt-io/flipt:v{{ incpatch .Version }}-nightly-amd64{{ else }}ghcr.io/flipt-io/flipt:v{{ .Tag }}-amd64{{ end }}"
build_flag_templates:
- "--platform=linux/amd64"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
extra_files:
- config/default.yml
- dockerfile: ./build/Dockerfile
use: buildx
goarch: arm64
image_templates:
- "{{ if .IsNightly }}flipt/flipt:v{{ incpatch .Version }}-nightly-arm64{{ else }}flipt/flipt:v{{ .Tag }}-arm64{{ end }}"
- "{{ if .IsNightly }}ghcr.io/flipt-io/flipt:v{{ incpatch .Version }}-nightly-arm64{{ else }}ghcr.io/flipt-io/flipt:v{{ .Tag }}-arm64{{ end }}"
build_flag_templates:
- "--platform=linux/arm64"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
extra_files:
- config/default.yml
docker_manifests:
- name_template: "{{ if .IsNightly }}flipt/flipt:v{{ incpatch .Version }}-nightly{{ else }}flipt/flipt:v{{ .Tag }}{{ end }}"
image_templates:
- "{{ if .IsNightly }}flipt/flipt:v{{ incpatch .Version }}-nightly-amd64{{ else }}flipt/flipt:v{{ .Tag }}-amd64{{ end }}"
- "{{ if .IsNightly }}flipt/flipt:v{{ incpatch .Version }}-nightly-arm64{{ else }}flipt/flipt:v{{ .Tag }}-arm64{{ end }}"
- name_template: "{{ if .IsNightly }}markphelps/flipt:v{{ incpatch .Version }}-nightly{{ else }}markphelps/flipt:v{{ .Tag }}{{ end }}" # TODO: deprecate
image_templates:
- "{{ if .IsNightly }}flipt/flipt:v{{ incpatch .Version }}-nightly-amd64{{ else }}flipt/flipt:v{{ .Tag }}-amd64{{ end }}"
- "{{ if .IsNightly }}flipt/flipt:v{{ incpatch .Version }}-nightly-arm64{{ else }}flipt/flipt:v{{ .Tag }}-arm64{{ end }}"
- name_template: "{{ if .IsNightly }}ghcr.io/flipt-io/flipt:v{{ incpatch .Version }}-nightly{{ else }}ghcr.io/flipt-io/flipt:v{{ .Tag }}{{ end }}"
image_templates:
- "{{ if .IsNightly }}ghcr.io/flipt-io/flipt:v{{ incpatch .Version }}-nightly-amd64{{ else }}ghcr.io/flipt-io/flipt:v{{ .Tag }}-amd64{{ end }}"
- "{{ if .IsNightly }}ghcr.io/flipt-io/flipt:v{{ incpatch .Version }}-nightly-arm64{{ else }}ghcr.io/flipt-io/flipt:v{{ .Tag }}-arm64{{ end }}"
announce:
discord:
enabled: true