Skip to content

Commit b1f3f0a

Browse files
stubbiclaude
andauthored
fix(release): write install.yaml outside dist for goreleaser dist check (#28)
## Summary GoReleaser pipe order: \`--clean\` wipes \`dist\` (step 1), then \`before:hooks\` runs (step 2), then the dist pipe re-checks \`dist\` is empty (step 3). PR #25 put \`make installer\` in \`before:hooks\`, which writes to \`dist/install.yaml\` and re-populates the directory before step 3 runs: \`\`\` dist is not empty, remove it before running goreleaser or use the --clean flag \`\`\` Fix: move \`install.yaml\` out of \`dist/\` inside the hook (\`release-assets/\`), update \`release.extra_files\`. ## Test plan - [ ] v0.1.6 release workflow goreleaser step succeeds - [ ] install.yaml attached to GitHub release Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent f74ef67 commit b1f3f0a

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

.goreleaser.yaml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@ version: 2
22

33
project_name: hermes-operator
44

5-
# Run after --clean wipes dist/, before archives/release glob extra_files.
6-
# The CI workflow also has setup-go + kubectl + kustomize available.
5+
# Run before goreleaser populates dist/ but after --clean wipes it.
6+
# make installer writes dist/install.yaml; move it to release-assets/ so
7+
# goreleaser's own "dist must be empty" check passes, then glob it from
8+
# release.extra_files.
79
before:
810
hooks:
9-
- make installer
11+
- sh -c "make installer && mkdir -p release-assets && mv dist/install.yaml release-assets/install.yaml && rmdir dist"
1012

1113
builds:
1214
- id: manager
@@ -60,4 +62,4 @@ release:
6062
owner: stubbi
6163
name: hermes-operator
6264
extra_files:
63-
- glob: dist/install.yaml
65+
- glob: release-assets/install.yaml

0 commit comments

Comments
 (0)