Skip to content

Commit 1a60d6f

Browse files
committed
chore: release body.sh with no commits fails action
1 parent c7828c0 commit 1a60d6f

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

.github/workflows/body.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,14 @@ changes() {
1313
fi
1414
}
1515

16-
git log "$(git describe --tags --abbrev=0 @^)"..@ \
16+
git log "$(git describe --tags --abbrev=0)"..@ \
1717
--pretty=format:" - [\`%h\`](../../commit/%H) - %s" > commits
1818

19+
if [ ! -s commits ]; then
20+
echo "No new commits since last tag: impossible to create changelog"
21+
exit 1
22+
fi
23+
1924
echo "body<<EOF"
2025
changes ":rocket: New features" "feat"
2126
changes ":bug: Fixes" "fix"

0 commit comments

Comments
 (0)