fix(release): make README.md / CHANGELOG.md optional in archive bundling#169
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
```
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
🤖 Generated with Claude Code