From 69dcaff988a345cbfddcdaf19fbd2c6cfd540b10 Mon Sep 17 00:00:00 2001 From: Amit Kumar Date: Thu, 14 May 2026 16:56:44 +0000 Subject: [PATCH] fix(release): make README.md / CHANGELOG.md optional in archive bundling MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The .goreleaser.yml `files:` entries were bare filenames (`README.md`, `CHANGELOG.md`) which goreleaser treats as required: globbing fails hard when the file doesn't exist: globbing failed for pattern README.md: matching "./README.md": file does not exist This bit v0.4.2 — every release would fail after #168 wiped the docs until the new reference docs land. Switch each bare filename to a glob (`README.md*`, `CHANGELOG.md*`). Goreleaser silently skips patterns that match zero files. The trailing `*` matches the file when present and nothing when absent — gracefully covering both "docs landed" and "docs not yet rewritten" states. `LICENSE*` already used this pattern. No behavior change when a README is present. `release-darwin.yml` already wraps its `cp` commands in `|| true`, so it was unaffected — only goreleaser-side bundling broke. Co-Authored-By: Claude Opus 4.7 --- .goreleaser.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index 1765cc4f..a8d4000f 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -62,10 +62,15 @@ archives: formats: [tar.gz] name_template: >- {{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }} + # Each entry is a glob; goreleaser silently skips patterns that match + # zero files. The bare `README.md` / `CHANGELOG.md` form would hard-fail + # when the file is absent (docs were wiped in #168 ahead of a clean + # reference-docs rewrite). The `*` suffix turns each into a glob that + # matches the file when present and nothing when absent. files: - LICENSE* - - README.md - - CHANGELOG.md + - README.md* + - CHANGELOG.md* checksum: name_template: 'checksums.sha256' algorithm: sha256