Spaces:
Paused
Paused
icebear0828 Claude Opus 4.6 commited on
Commit ·
680b9a3
1
Parent(s): 35c714c
ci: auto-sync CHANGELOG to README via GitHub Actions
Browse filesExtracts the 3 most recent version sections from CHANGELOG.md and
injects them between <!-- CHANGELOG:START/END --> markers in README.md.
Triggered on push to master when CHANGELOG.md changes.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- .github/workflows/sync-changelog.yml +62 -0
- README.md +3 -16
.github/workflows/sync-changelog.yml
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: Sync CHANGELOG to README
|
| 2 |
+
|
| 3 |
+
on:
|
| 4 |
+
push:
|
| 5 |
+
branches: [master]
|
| 6 |
+
paths: [CHANGELOG.md]
|
| 7 |
+
|
| 8 |
+
permissions:
|
| 9 |
+
contents: write
|
| 10 |
+
|
| 11 |
+
jobs:
|
| 12 |
+
sync:
|
| 13 |
+
runs-on: ubuntu-latest
|
| 14 |
+
steps:
|
| 15 |
+
- uses: actions/checkout@v4
|
| 16 |
+
|
| 17 |
+
- name: Extract recent changelog and update README
|
| 18 |
+
run: |
|
| 19 |
+
# Extract the first 3 version sections from CHANGELOG.md
|
| 20 |
+
# (everything between the first "## " heading and the 4th "## " heading)
|
| 21 |
+
python3 - <<'PYEOF'
|
| 22 |
+
import re, pathlib
|
| 23 |
+
|
| 24 |
+
changelog = pathlib.Path("CHANGELOG.md").read_text(encoding="utf-8")
|
| 25 |
+
readme = pathlib.Path("README.md").read_text(encoding="utf-8")
|
| 26 |
+
|
| 27 |
+
# Split changelog into version sections by "## " headings
|
| 28 |
+
# Skip the title lines before the first "## "
|
| 29 |
+
sections = re.split(r"(?=^## )", changelog, flags=re.MULTILINE)
|
| 30 |
+
# Filter to actual version sections (start with "## ")
|
| 31 |
+
versions = [s for s in sections if s.startswith("## ")]
|
| 32 |
+
|
| 33 |
+
# Take up to 3 most recent versions
|
| 34 |
+
recent = versions[:3]
|
| 35 |
+
if not recent:
|
| 36 |
+
print("No version sections found in CHANGELOG.md")
|
| 37 |
+
exit(0)
|
| 38 |
+
|
| 39 |
+
# Build the replacement content
|
| 40 |
+
content = "\n".join(s.rstrip() for s in recent)
|
| 41 |
+
|
| 42 |
+
# Replace between markers
|
| 43 |
+
pattern = r"(<!-- CHANGELOG:START -->).*?(<!-- CHANGELOG:END -->)"
|
| 44 |
+
replacement = f"<!-- CHANGELOG:START -->\n{content}\n<!-- CHANGELOG:END -->"
|
| 45 |
+
new_readme = re.sub(pattern, replacement, readme, flags=re.DOTALL)
|
| 46 |
+
|
| 47 |
+
if new_readme == readme:
|
| 48 |
+
print("README unchanged")
|
| 49 |
+
exit(0)
|
| 50 |
+
|
| 51 |
+
pathlib.Path("README.md").write_text(new_readme, encoding="utf-8")
|
| 52 |
+
print(f"Updated README with {len(recent)} changelog section(s)")
|
| 53 |
+
PYEOF
|
| 54 |
+
|
| 55 |
+
- name: Commit if changed
|
| 56 |
+
run: |
|
| 57 |
+
git config user.name "github-actions[bot]"
|
| 58 |
+
git config user.email "github-actions[bot]@users.noreply.github.com"
|
| 59 |
+
git diff --quiet README.md && echo "No changes" && exit 0
|
| 60 |
+
git add README.md
|
| 61 |
+
git commit -m "docs: auto-sync changelog to README [skip ci]"
|
| 62 |
+
git push
|
README.md
CHANGED
|
@@ -318,23 +318,10 @@ server:
|
|
| 318 |
|
| 319 |
## 📝 最近更新 (Recent Changes)
|
| 320 |
|
| 321 |
-
> 完整更新日志请查看 [CHANGELOG.md](./CHANGELOG.md)
|
| 322 |
|
| 323 |
-
|
| 324 |
-
|
| 325 |
-
- **图片输入支持** — OpenAI(`image_url`)、Anthropic(`image/base64`)、Gemini(`inlineData`)三种格式的图片内容透传到 Codex 后端
|
| 326 |
-
- **每窗口用量计数器** — Dashboard 主显示当前窗口的请求数和 Token 用量,窗口过期自动归零
|
| 327 |
-
- **空响应自动重试** — Codex 返回空响应时自动换号重试(最多 3 次)
|
| 328 |
-
- **动态模型列表** — 后台自动从 Codex 后端获取模型目录,与静态 YAML 合并
|
| 329 |
-
- **工具 schema 修复** — MCP 工具缺少 `properties` 字段时不再 400 报错
|
| 330 |
-
|
| 331 |
-
### v0.8.0
|
| 332 |
-
|
| 333 |
-
- 原生 function_call / tool_calls 支持(所有协议)
|
| 334 |
-
|
| 335 |
-
### v0.7.0
|
| 336 |
-
|
| 337 |
-
- `developer` 角色支持、数组格式 content、模型响应自动过滤 Codex Desktop 指令
|
| 338 |
|
| 339 |
## 📄 许可协议 (License)
|
| 340 |
|
|
|
|
| 318 |
|
| 319 |
## 📝 最近更新 (Recent Changes)
|
| 320 |
|
| 321 |
+
> 完整更新日志请查看 [CHANGELOG.md](./CHANGELOG.md),以下内容由 CI 自动同步。
|
| 322 |
|
| 323 |
+
<!-- CHANGELOG:START -->
|
| 324 |
+
<!-- CHANGELOG:END -->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 325 |
|
| 326 |
## 📄 许可协议 (License)
|
| 327 |
|