Skip to content

Commit 41f59a0

Browse files
write release notes to current dir to avoid goreleaser --clean deleting them (#700)
1 parent b7c180c commit 41f59a0

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

.github/workflows/release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,15 +124,15 @@ jobs:
124124
go-version: ${{ env.GO_VERSION }}
125125

126126
# Use release notes from the tag body when present (set by interactive `make release` or `make release tag=vX.Y.Z` with dist/release_notes.md). Otherwise GoReleaser uses its default changelog.
127+
# Write to repo root so GoReleaser's --clean (which removes dist/) does not delete the file before it is read.
127128
- name: Get release notes from tag
128129
id: get-tag-notes
129130
run: |
130131
TAG="${GITHUB_REF#refs/tags/}"
131132
BODY=$(git tag -l --format='%(contents:body)' "$TAG")
132133
if [ -n "$BODY" ]; then
133-
mkdir -p dist
134-
printf '%s' "$BODY" > dist/release_notes.md
135-
echo "args=--release-notes=dist/release_notes.md" >> $GITHUB_OUTPUT
134+
printf '%s' "$BODY" > release_notes.md
135+
echo "args=--release-notes=release_notes.md" >> $GITHUB_OUTPUT
136136
fi
137137
138138
- name: Run GoReleaser

0 commit comments

Comments
 (0)