Skip to content

Commit 4ac21f8

Browse files
committed
🐛 fix(ci): restore "Recent Changes" in release notes
- Exclude the current tag when resolving the previous version to build a correct git log range - Add fallback content when the computed range has no commits to avoid an empty section - Keep excluding commits authored by github-actions[bot] - Retain fallback to the most recent 50 commits when no previous version tag exists File: .github/workflows/build.yml
1 parent 2ab204a commit 4ac21f8

4 files changed

Lines changed: 6 additions & 4 deletions

File tree

.github/workflows/build.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ jobs:
157157
158158
# Build release notes from last version to this version, exclude github-actions[bot]
159159
# Get the previous version tag
160-
PREV_VERSION=$(git tag --sort=-version:refname | grep -E "^v[0-9]{4}\.[0-9]{2}\.[0-9]{2}\.[0-9]{4}$" | head -1)
160+
PREV_VERSION=$(git tag --sort=-version:refname | grep -E "^v[0-9]{4}\.[0-9]{2}\.[0-9]{2}\.[0-9]{4}$" | grep -v "^$VERSION$" | head -1)
161161
162162
if [ -n "$PREV_VERSION" ]; then
163163
echo "Previous version found: $PREV_VERSION"
@@ -167,6 +167,11 @@ jobs:
167167
RECENT_COMMITS=$(git log --pretty=format:"%an%x09%s" --max-count=50 ${AFTER_SHA} | awk -F'\t' '$1!="github-actions[bot]" {print "- "$2}')
168168
fi
169169
170+
# Fallback when no commits were found in the computed range
171+
if [ -z "$RECENT_COMMITS" ]; then
172+
RECENT_COMMITS="- No changes found"
173+
fi
174+
170175
# Create release notes
171176
cat > release_notes.md << EOF
172177
## 🚀 Automated Release $VERSION

docs/en/submit.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
22
hide:
33
- navigation
4-
- toc
54
---
65

76
## Submit a model (auto-PR)

docs/ja/submit.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
22
hide:
33
- navigation
4-
- toc
54
---
65

76
## モデルを提出(自動 PR)

docs/zh/submit.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
22
hide:
33
- navigation
4-
- toc
54
---
65

76
## 提交模型(自动生成 PR)

0 commit comments

Comments
 (0)