Skip to content

Commit 00db008

Browse files
committed
Preserve custom release descriptions in publish workflow
Only set the release body from the template if the author left it empty. This prevents overwriting hand-edited release descriptions.
1 parent 058dcf3 commit 00db008

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

.github/workflows/publish.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,11 @@ jobs:
110110
# Upload complete bundle
111111
gh release upload "$TAG" opendis7-release.zip --clobber --repo "$REPO"
112112
113-
# Update release body with the generated description
114-
gh release edit "$TAG" --notes-file /tmp/release-body.md --repo "$REPO"
113+
# Only set release body if the author left it empty
114+
EXISTING_BODY=$(gh release view "$TAG" --repo "$REPO" --json body --jq '.body')
115+
if [ -z "$EXISTING_BODY" ]; then
116+
gh release edit "$TAG" --notes-file /tmp/release-body.md --repo "$REPO"
117+
fi
115118
116119
- name: Upload Javadoc for GitHub Pages
117120
uses: actions/upload-pages-artifact@v3

0 commit comments

Comments
 (0)