feat(ci): add list of all commits to changelog entry
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user