-
Notifications
You must be signed in to change notification settings - Fork 5
/
.goreleaser.yaml
97 lines (84 loc) Β· 3.5 KB
/
.goreleaser.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
project_name: gloomberg
# This is an example .goreleaser.yml file with some sensible defaults.
# Make sure to check the documentation at https://goreleaser.com
before:
hooks:
# You may remove this if you don't use go modules.
- "go mod tidy -e"
# you may remove this if you don't need 'go generate'
# - go generate ./...
# - bash -c "for abi in internal/abis/*.json; do abiname="$(basename "${abi}")"; abigen --abi="${abi}" --pkg=abis --type="${abiname//.json/}" --out="${abi//.json/.go}"; done"
# - oapi-codegen -package ensmetadata -old-config-style -generate types,client,spec internal/assets/ens_metadata_service_0.0.1-alpha.1.yaml > internal/ensmetadata/ensmetadata.go
builds:
- binary: gloomberg
env: ["CGO_ENABLED=0"]
flags: ["-trimpath"]
goos: [linux, darwin, windows]
goarch: [amd64, arm64]
ignore: [{ goos: windows, goarch: arm64 }]
# Set the modified timestamp on the output binary, typically
# you would do this to ensure a build was reproducible. Pass
# empty string to skip modifying the output.
# Default is empty string.
mod_timestamp: "{{ .CommitTimestamp }}"
ldflags:
- -s -w
- -X main.version={{.Version}}
- -X main.commit={{.ShortCommit}}
- -X main.builtBy=benleb
- -X main.buildDate={{.CommitDate}}
universal_binaries:
- # Whether to remove the previous single-arch binaries from the artifact list.
# If left as false, your end release might have both several macOS archives: amd64, arm64 and all.
#
# Defaults to false.
replace: true
dockers:
- image_templates:
[
"{{ .Env.REGISTRY }}/benleb/{{ .ProjectName }}:{{ .Version }}-amd64",
"{{ .Env.REGISTRY }}/benleb/{{ .ProjectName }}:latest-amd64",
]
use: buildx
dockerfile: .github/run.Dockerfile
build_flag_templates: ["--platform=linux/amd64"]
- image_templates:
[
"{{ .Env.REGISTRY }}/benleb/{{ .ProjectName }}:{{ .Version }}-arm64",
"{{ .Env.REGISTRY }}/benleb/{{ .ProjectName }}:latest-arm64",
]
use: buildx
goarch: arm64
dockerfile: .github/run.Dockerfile
build_flag_templates: ["--platform=linux/arm64/v8"]
docker_manifests:
- name_template: "{{ .Env.REGISTRY }}/benleb/{{ .ProjectName }}:{{ .Version }}"
image_templates:
[
"{{ .Env.REGISTRY }}/benleb/{{ .ProjectName }}:{{ .Version }}-amd64",
"{{ .Env.REGISTRY }}/benleb/{{ .ProjectName }}:{{ .Version }}-arm64",
]
- name_template: "{{ .Env.REGISTRY }}/benleb/{{ .ProjectName }}:latest"
image_templates:
[
"{{ .Env.REGISTRY }}/benleb/{{ .ProjectName }}:latest-amd64",
"{{ .Env.REGISTRY }}/benleb/{{ .ProjectName }}:latest-arm64",
]
kos:
- repository: "ghcr.io/benleb/gloomberg"
bare: true
preserve_import_paths: false
tags: ["{{.Tag}}", latest]
platforms: [linux/amd64, linux/arm64]
# config the checksum filename | https://goreleaser.com/customization/checksum
checksum: { name_template: "checksums.txt" }
snapshot: { name_template: "{{ .Summary }}" }
changelog: { sort: asc, filters: { exclude: ["^docs:", "^test:"] } }
announce:
telegram:
# Whether its enabled or not. Defaults to false.
enabled: true
# Integer representation of your channel
chat_id: -1001808788625
# Message template to use while publishing | `{{ .ProjectName }} {{ .Tag }} is out! Check it out at {{ .ReleaseURL }}`
message_template: 'ππ {{ .ProjectName }} *{{ replace .Tag "." "\\." }}* is out ππ β {{ replace .ReleaseURL "." "\\." }}'