feat(ci): add list of all commits to changelog entry

This commit is contained in:
2026-02-04 20:14:38 +01:00
parent 48bf447ce1
commit 437c9f4a25

View File

@@ -33,7 +33,20 @@ find . -name package.json ! -path "*/node_modules/*" | while read file; do
done done
# ------------------------------------------------------------------- # -------------------------------------------------------------------
# 3. Update CHANGELOG.md (prepend) # 3. Generate commit list since last release
# -------------------------------------------------------------------
# Get the previous tag (fallback to empty if none)
LAST_TAG=$(git tag --sort=-creatordate | grep -v "^$TAG$" | head -n 1 || echo "")
if [ -n "$LAST_TAG" ]; then
COMMITS=$(git log "$LAST_TAG"..HEAD --pretty=format:'[%h](https://git.max-richter.dev/max/nodarium/commit/%H) %s')
else
COMMITS=$(git log HEAD --pretty=format:'[%h](https://git.max-richter.dev/max/nodarium/commit/%H) %s')
fi
# -------------------------------------------------------------------
# 4. Update CHANGELOG.md (prepend)
# ------------------------------------------------------------------- # -------------------------------------------------------------------
tmp_changelog="CHANGELOG.tmp" tmp_changelog="CHANGELOG.tmp"
@@ -42,6 +55,11 @@ tmp_changelog="CHANGELOG.tmp"
echo "" echo ""
echo "$NOTES" echo "$NOTES"
echo "" echo ""
if [ -n "$COMMITS" ]; then
echo "All Commits:"
echo "$COMMITS"
echo ""
fi
echo "---" echo "---"
echo "" echo ""
if [ -f CHANGELOG.md ]; then if [ -f CHANGELOG.md ]; then
@@ -54,7 +72,7 @@ mv "$tmp_changelog" CHANGELOG.md
pnpm exec dprint fmt CHANGELOG.md pnpm exec dprint fmt CHANGELOG.md
# ------------------------------------------------------------------- # -------------------------------------------------------------------
# 4. Create release commit # 5. Create release commit
# ------------------------------------------------------------------- # -------------------------------------------------------------------
git config user.name "release-bot" git config user.name "release-bot"
@@ -71,7 +89,7 @@ fi
git commit -m "chore(release): $TAG" git commit -m "chore(release): $TAG"
# ------------------------------------------------------------------- # -------------------------------------------------------------------
# 5. Push changes # 6. Push changes
# ------------------------------------------------------------------- # -------------------------------------------------------------------
git push origin main git push origin main