Skip to content

Commit

Permalink
Update update-changelog.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
molanp authored Oct 27, 2024
1 parent b0d298f commit 6680f17
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/update-changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,15 @@ jobs:
if [ "${{ env.create }}" == "true" ]; then
echo "# Changelog" > CHANGELOG.md
echo "## [$CURRENT_DATE] - Initial Release" >> CHANGELOG.md
# 获取所有提交信息并倒序写入,包含哈希
git log --reverse --date=short --pretty=format:"- %s (%h)" >> CHANGELOG.md
git log --reverse --date=short --pretty=format:"- %s (hash: %h)" >> CHANGELOG.md
else
echo "Updating existing CHANGELOG.md"
echo "" >> CHANGELOG.md
echo "## [$CURRENT_DATE] - Update" >> CHANGELOG.md
# 获取最新提交信息并写入,包含哈希
git log -1 --date=short --pretty=format:"- %s (%h)" >> CHANGELOG.md
git log -1 --date=short --pretty=format:"- %s (hash: %h)" >> CHANGELOG.md
fi
- name: Commit and push changes
run: |
git config --local user.email "action@github.com"
Expand Down

0 comments on commit 6680f17

Please sign in to comment.