Skip to content

Commit b57bdad

Browse files
committed
chore(cd): add empty changelog guard for re-tagged releases
Add fallback message when changelog is empty (e.g., re-tagging same commit without new changes). Changes: - Add conditional check after git log command - Display \"No new changes since {PREVIOUS_TAG}\" when empty - Prevents blank changelog section in GitHub releases Improves release notes clarity for edge cases like tag corrections or multiple coach tags on same commit.
1 parent cd069aa commit b57bdad

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

.github/workflows/python-cd.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,11 @@ jobs:
120120
else
121121
echo "📝 Generating changelog from $PREVIOUS_TAG to ${{ steps.version.outputs.tag_name }}"
122122
CHANGELOG=$(git log --pretty=format:"- %s (%h)" ${PREVIOUS_TAG}..${{ steps.version.outputs.tag_name }})
123+
124+
# Guard against empty changelog (e.g., re-tagging same commit)
125+
if [ -z "$CHANGELOG" ]; then
126+
CHANGELOG="No new changes since $PREVIOUS_TAG"
127+
fi
123128
fi
124129
125130
# Write changelog to file

0 commit comments

Comments
 (0)