forked from ardanlabs/kronk
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.goreleaser.yaml
More file actions
90 lines (83 loc) · 2.78 KB
/
Copy path.goreleaser.yaml
File metadata and controls
90 lines (83 loc) · 2.78 KB
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
version: 2
project_name: kronk
builds:
- id: kronk
main: ./cmd/kronk
binary: kronk
goos:
- linux
- darwin
- windows
goarch:
- amd64
- arm64
# No link-time -X override for sdk/kronk.Version — it is a `const`
# and must be bumped in the same commit that prepares the release
# tag. The release workflow runs .github/scripts/check-version.sh
# before invoking goreleaser, so any tag/constant mismatch fails
# the pipeline before binaries are produced.
#
# `-s -w` strips the symbol table and DWARF debug info, which
# also disables `go version -m <binary>` build-info inspection on
# the released artifacts (the VCS revision is still recorded by
# goreleaser in the release notes). Acceptable trade-off for the
# ~20% binary-size reduction; matches what the Dockerfile builder
# produces so the OCI and tarball binaries are byte-identical.
ldflags:
- -s -w
# `-trimpath` makes the resulting binary reproducible across build
# machines by stripping absolute module/source paths from the
# embedded debug info — matching what the Dockerfile builder uses.
flags:
- -trimpath
before:
hooks:
- make kronk-docs
# FIXME: tsc fails on this
# - make bui-build
archives:
- formats:
- tar.gz
format_overrides:
- goos: windows
formats:
- zip
checksum:
name_template: "checksums.txt"
# Generate an SBOM (CycloneDX-flavored SPDX JSON) for every archive
# GoReleaser produces. The release workflow installs syft up-front and
# attaches SLSA build provenance over both the archives AND these SBOM
# files, so a consumer can verify the SBOM provenance via
# `gh attestation verify dist/<archive>.sbom.json`.
sboms:
- id: archive
artifacts: archive
documents:
- "${artifact}.sbom.json"
# NOTE: GoReleaser deprecated `brews:` in favor of `homebrew_casks:` (v2.10).
# Per the GoReleaser maintainer, casks generated this way work on both macOS
# and Linuxbrew, so this is the recommended path going forward.
homebrew_casks:
- name: kronk
binaries:
- kronk
repository:
owner: ardanlabs
name: homebrew-kronk
branch: main
token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}"
directory: Casks
homepage: "https://github.com/ardanlabs/kronk"
description: "Local LLM inference SDK and server CLI"
commit_author:
name: goreleaserbot
email: bot@goreleaser.com
commit_msg_template: "kronk {{ .Tag }}"
# Strip the macOS Gatekeeper quarantine bit so unsigned binaries run
# without "developer cannot be verified" prompts.
hooks:
post:
install: |
if OS.mac?
system_command "/usr/bin/xattr", args: ["-dr", "com.apple.quarantine", "#{staged_path}/kronk"]
end