-
Notifications
You must be signed in to change notification settings - Fork 0
/
.goreleaser-template.yaml
104 lines (98 loc) · 3.7 KB
/
.goreleaser-template.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
env:
- GOPRIVATE=github.com/smartcontractkit/*
- ZIG_EXEC={{ if index .Env "ZIG_EXEC" }}{{ .Env.ZIG_EXEC }}{{ else }}zig{{ end }}
- IMAGE_REPO={{ if index .Env "IMAGE_REPO" }}{{ .Env.IMAGE_REPO }}{{ else }}localhost:5001/{{ .ProjectName }}{{ end }}
# See https://goreleaser.com/customization/build/
builds:
- binary: "{{ .ProjectName }}"
id: linux-amd64
main: ./cmd
env:
- CGO_ENABLED=1
- CC=$ZIG_EXEC cc -target x86_64-linux-gnu
- CCX=$ZIG_EXEC c++ -target x86_64-linux-gnu
flags:
- -trimpath
- -buildmode=pie
goos:
- linux
goarch:
- amd64
- binary: "{{ .ProjectName }}"
id: linux-arm64
main: ./cmd
env:
- CGO_ENABLED=1
- CC=$ZIG_EXEC cc -target aarch64-linux-gnu
- CCX=$ZIG_EXEC c++ -target aarch64-linux-gnu
flags:
- -trimpath
- -buildmode=pie
goos:
- linux
goarch:
- arm64
# See https://goreleaser.com/customization/docker/
dockers:
- id: linux-amd64
dockerfile: ./../Dockerfile
use: buildx
goos: linux
goarch: amd64
build_flag_templates:
- "--build-arg=app={{ .ProjectName }}"
- "--platform=linux/amd64"
- "--label=org.opencontainers.image.created={{ .Date }}"
- "--label=org.opencontainers.image.name={{ .ProjectName }}"
- "--label=org.opencontainers.image.revision={{ .FullCommit }}"
- "--label=org.opencontainers.image.version={{ .Version }}"
- "--label=org.opencontainers.image.source={{ .GitURL }}"
image_templates:
- "{{ if and (not .IsSnapshot) (not .IsNightly) }}{{ .Env.IMAGE_REPO }}:{{ .Version }}-amd64{{ end }}"
- "{{ if or (.IsSnapshot) (.IsNightly) }}{{ .Env.IMAGE_REPO }}:sha-{{ .ShortCommit }}-amd64{{ end }}"
- id: linux-arm64
dockerfile: ./../Dockerfile
use: buildx
goos: linux
goarch: arm64
build_flag_templates:
- "--build-arg=app={{ .ProjectName }}"
- "--platform=linux/arm64"
- "--label=org.opencontainers.image.created={{ .Date }}"
- "--label=org.opencontainers.image.name={{ .ProjectName }}"
- "--label=org.opencontainers.image.revision={{ .FullCommit }}"
- "--label=org.opencontainers.image.version={{ .Version }}"
- "--label=org.opencontainers.image.source={{ .GitURL }}"
image_templates:
- "{{ if and (not .IsSnapshot) (not .IsNightly) }}{{ .Env.IMAGE_REPO }}:{{ .Version }}-arm64{{ end }}"
- "{{ if or (.IsSnapshot) (.IsNightly) }}{{ .Env.IMAGE_REPO }}:sha-{{ .ShortCommit }}-arm64{{ end }}"
# See https://goreleaser.com/customization/docker_manifest/
docker_manifests:
- name_template: "{{ if and (not .IsSnapshot) (not .IsNightly) }}{{ .Env.IMAGE_REPO }}:{{ .Version }}{{ end }}"
image_templates:
- "{{ if and (not .IsSnapshot) (not .IsNightly) }}{{ .Env.IMAGE_REPO }}:{{ .Version }}-amd64{{ end }}"
- "{{ if and (not .IsSnapshot) (not .IsNightly) }}{{ .Env.IMAGE_REPO }}:{{ .Version }}-arm64{{ end }}"
- name_template: "{{ if or (.IsSnapshot) (.IsNightly) }}{{ .Env.IMAGE_REPO }}:sha-{{ .ShortCommit }}{{ end }}"
image_templates:
- "{{ if or (.IsSnapshot) (.IsNightly) }}{{ .Env.IMAGE_REPO }}:sha-{{ .ShortCommit }}-amd64{{ end }}"
- "{{ if or (.IsSnapshot) (.IsNightly) }}{{ .Env.IMAGE_REPO }}:sha-{{ .ShortCommit }}-arm64{{ end }}"
checksum:
name_template: "checksums.txt"
snapshot:
name_template: "{{ incpatch .Version }}-next"
changelog:
sort: asc
filters:
exclude:
- "^docs:"
- "^test:"
# GitHub Release
release:
github:
owner: smartcontractkit
name: chainlink-data-streams
# If there is a prerelease suffix on the version tag (e.g. v1.0.0-rc1), then
# the GitHub Release will be created as a "prerelease".
# Default is false.
prerelease: auto
disable: true