fix(release): update release notes generation logic
This commit is contained in:
@@ -65,11 +65,10 @@ jobs:
|
||||
|
||||
PREV_TAG=$(git tag --sort=-version:refname | { grep -v "^${TAG}$" || true; } | head -1)
|
||||
if [ -n "$PREV_TAG" ]; then
|
||||
RANGE="${PREV_TAG}..${TAG}"
|
||||
NOTES=$(git log "${PREV_TAG}..${TAG}" --pretty=format:"- %s" --no-merges)
|
||||
else
|
||||
RANGE="HEAD~20..HEAD"
|
||||
NOTES=$(git log --pretty=format:"- %s" --no-merges)
|
||||
fi
|
||||
NOTES=$(git log "$RANGE" --pretty=format:"- %s" --no-merges)
|
||||
BODY="## What's changed"$'\n'"${NOTES}"
|
||||
BODY_JSON=$(printf '%s' "$BODY" | python3 -c 'import json,sys; print(json.dumps(sys.stdin.read()))')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user