From 437c9f4a252125e1724686edace0f5f006f58439 Mon Sep 17 00:00:00 2001 From: Max Richter Date: Wed, 4 Feb 2026 20:14:38 +0100 Subject: [PATCH] feat(ci): add list of all commits to changelog entry --- .gitea/scripts/create-release.sh | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/.gitea/scripts/create-release.sh b/.gitea/scripts/create-release.sh index a1eb635..a8dafc0 100755 --- a/.gitea/scripts/create-release.sh +++ b/.gitea/scripts/create-release.sh @@ -33,7 +33,20 @@ find . -name package.json ! -path "*/node_modules/*" | while read file; do 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" @@ -42,6 +55,11 @@ tmp_changelog="CHANGELOG.tmp" echo "" echo "$NOTES" echo "" + if [ -n "$COMMITS" ]; then + echo "All Commits:" + echo "$COMMITS" + echo "" + fi echo "---" echo "" if [ -f CHANGELOG.md ]; then @@ -54,7 +72,7 @@ mv "$tmp_changelog" CHANGELOG.md pnpm exec dprint fmt CHANGELOG.md # ------------------------------------------------------------------- -# 4. Create release commit +# 5. Create release commit # ------------------------------------------------------------------- git config user.name "release-bot" @@ -71,7 +89,7 @@ fi git commit -m "chore(release): $TAG" # ------------------------------------------------------------------- -# 5. Push changes +# 6. Push changes # ------------------------------------------------------------------- git push origin main