Vectrum
Sign In

release: build archives for linux and macos with goreleaser

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Jjonicommitted 1 parent 9f8d022commit47d11b8

Showing 2 changed files with 96 additions and 0 deletions.

+3−0.gitignoreView File
@@ -1,6 +1,9 @@
11 /.codey/
22 /evals/runs/
33 /codey
4+ /codey.exe
5+ # What goreleaser writes, from a release or a local --snapshot run.
6+ /dist/
47 /.superpowers/
58
69 # Left behind by builds from before the rename.
+93−0.goreleaser.yamladdedView File
@@ -0,0 +1,93 @@
1+ # Release configuration for goreleaser v2. A tag push runs it through
2+ # .github/workflows/release.yml; `goreleaser release --snapshot --clean` runs
3+ # the same thing locally into dist/ without publishing anything.
4+ version: 2
5+
6+ project_name: codey
7+
8+ before:
9+ hooks:
10+ # A go.sum that disagrees with go.mod fails here, before four builds
11+ # each fail the same way.
12+ - go mod tidy -diff
13+
14+ builds:
15+ - id: codey
16+ main: ./cmd/codey
17+ binary: codey
18+ env:
19+ # Codey has no cgo dependencies, and a static binary is what lets the
20+ # one linux archive run on any distribution's libc.
21+ - CGO_ENABLED=0
22+ goos: [linux, darwin]
23+ goarch: [amd64, arm64]
24+ flags:
25+ # Builder paths stay out of panics and the binary is reproducible.
26+ - -trimpath
27+ ldflags:
28+ # -s -w drops the symbol table and DWARF, which a release has no use
29+ # for. The version is stamped from the tag; cmd/codey/version.go puts
30+ # the v back on and says what is used when nothing is stamped.
31+ - -s -w -X main.version={{.Version}}
32+ mod_timestamp: "{{ .CommitTimestamp }}"
33+
34+ archives:
35+ - id: codey
36+ ids: [codey]
37+ formats: [tar.gz]
38+ # No version in the name, so .../releases/latest/download/codey_linux_amd64.tar.gz
39+ # is a URL the README can print once and that never goes stale. The
40+ # release a file belongs to already says which version it is, and so
41+ # does codey --version.
42+ name_template: "{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}"
43+ files:
44+ - README.md
45+ - LICENSE
46+
47+ checksum:
48+ name_template: checksums.txt
49+ algorithm: sha256
50+
51+ snapshot:
52+ version_template: "{{ incpatch .Version }}-SNAPSHOT-{{ .ShortCommit }}"
53+
54+ changelog:
55+ sort: asc
56+ use: git
57+ filters:
58+ exclude:
59+ - "^Merge "
60+ - "^wip"
61+
62+ release:
63+ github:
64+ owner: johannSo
65+ name: codey
66+ # A tag like v0.7.0-rc.1 is published as a pre-release rather than as the
67+ # latest, so go install ...@latest and the download page agree.
68+ prerelease: auto
69+
70+ # Homebrew, once there is a tap to publish to. Create the repository
71+ # johannSo/homebrew-tap, give the release workflow a token that can push to
72+ # it (the default GITHUB_TOKEN is scoped to this repository only) as the
73+ # secret HOMEBREW_TAP_TOKEN, pass it through as an env var in release.yml,
74+ # and uncomment this. `brew install johannSo/tap/codey` then works.
75+ #
76+ # homebrew_casks:
77+ # - name: codey
78+ # ids: [codey]
79+ # repository:
80+ # owner: johannSo
81+ # name: homebrew-tap
82+ # token: "{{ .Env.HOMEBREW_TAP_TOKEN }}"
83+ # homepage: https://github.com/johannSo/codey
84+ # description: A coding agent harness, with a TUI and a one-prompt mode.
85+ # license: MIT
86+ # # The binaries are not notarized, so Gatekeeper would quarantine the
87+ # # download; this clears the flag on install.
88+ # hooks:
89+ # post:
90+ # install: |
91+ # if system_command("/usr/bin/xattr", args: ["-h"]).exit_status == 0
92+ # system_command "/usr/bin/xattr", args: ["-dr", "com.apple.quarantine", "#{staged_path}/codey"]
93+ # end