Skip to content

Commit dea2452

Browse files
committed
test(announce): test
1 parent cc6908d commit dea2452

2 files changed

Lines changed: 9 additions & 7 deletions

File tree

.github/workflows/update_announcement.yml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
"model": "deepseek-chat",
5252
"messages": [
5353
{"role": "system", "content": "You are a helpful assistant"},
54-
{"role": "user", "content": "Please summarize the following update in one sentence, suitable for posting in the website announcement bar: ${{ steps.changelog.outputs.added }}"}
54+
{"role": "user", "content": "用中文回答,一句话总结以下更新内容,适合放在公告栏:${{ steps.changelog.outputs.added }}"}
5555
]
5656
}' | jq -r '.choices[0].message.content')
5757
echo "response<<EOF" >> $GITHUB_OUTPUT
@@ -61,12 +61,8 @@ jobs:
6161
- name: Update main.html announce
6262
run: |
6363
summary="${{ steps.inference.outputs.response }}"
64-
sed -i "/{% block announce %}/,/{% endblock %}/c\\
65-
{% block announce %}\\
66-
<strong>📢 ${summary} <a href=\"/plotfig/changelog\">更新日志</a></strong>\\
67-
{% endblock %}" overrides/main.html
68-
env:
69-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
64+
# 使用 printf 保证换行缩进和变量替换都准确
65+
printf '{%% extends "base.html" %%}\n\n{%% block announce %%}\n <strong>📢 %s!点击<a href="/plotfig/changelog">更新日志</a>了解更多。</strong>\n{%% endblock %%}\n' "$summary" > overrides/main.html
7066
7167
- name: Commit and push changes
7268
run: |

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## 1.4.6 (2025-07-29)
2+
3+
### Feat
4+
5+
- **test**: 新增自动更新公告栏的功能。
6+
17
## 1.4.5 (2025-07-29)
28

39
### Feat

0 commit comments

Comments
 (0)