Skip to content

fix(release): make README.md / CHANGELOG.md optional in archive bundling#169

Merged
aksOps merged 1 commit into
mainfrom
fix/goreleaser-optional-doc-files
May 14, 2026
Merged

fix(release): make README.md / CHANGELOG.md optional in archive bundling#169
aksOps merged 1 commit into
mainfrom
fix/goreleaser-optional-doc-files

Conversation

@aksOps
Copy link
Copy Markdown
Contributor

@aksOps aksOps commented May 14, 2026

Summary

`.goreleaser.yml` had bare filename entries (`README.md`, `CHANGELOG.md`) in the archive `files:` block. Goreleaser treats those as required — globbing hard-fails when the file is absent:

```
globbing failed for pattern README.md: matching "./README.md":
file does not exist
```

That bit the v0.4.2 release attempt (PR #168 wiped the docs ahead of a clean reference-docs rewrite). Both `release-go` and `release-darwin` failed, no release was created.

Fix

Switch each bare filename to a glob:

```yaml
files:

  • LICENSE*
  • README.md* # was: README.md
  • CHANGELOG.md* # was: CHANGELOG.md
    ```

Goreleaser silently skips patterns that match zero files. The trailing `*` matches the file when present (post new-docs land) and nothing when absent — graceful in both states.

No behavior change once a README/CHANGELOG returns. `LICENSE*` already used this pattern; just bringing the other two into line.

`release-darwin.yml` already wraps its `cp` commands in `|| true` so it was unaffected — only goreleaser-side bundling broke.

Test plan

  • YAML parses (`python3 -c "import yaml; yaml.safe_load(...)"`)
  • Functional: after merge, re-tag v0.4.2 — release should succeed with archives containing only `codeiq` + `LICENSE` (no README/CHANGELOG until they're rewritten)

🤖 Generated with Claude Code

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 <noreply@anthropic.com>
@aksOps aksOps merged commit 506e918 into main May 14, 2026
13 checks passed
@aksOps aksOps deleted the fix/goreleaser-optional-doc-files branch May 14, 2026 17:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant