mirror of
https://github.com/hellodigua/ChatLab.git
synced 2026-10-25 17:54:34 +08:00
chore(changelog): move release changelogs out of docs
This commit is contained in:
1 parent
8564db7241
commit
2d714857ef
16 files changed
+48
-55
No files matched your search
@@ -338,8 +338,8 @@ jobs:
|
||||
echo "Current version: $CURRENT_VERSION"
|
||||
|
||||
# 按当前版本号从 changelog JSON 中提取 summary,避免补发旧版本时误用第一条日志。
|
||||
EN_SUMMARY=$(jq -r --arg version "$VERSION_NUMBER" 'map(select(.version == $version))[0].summary // "See changelog for details"' docs/public/changelogs/en.json 2>/dev/null || echo "See changelog for details")
|
||||
CN_SUMMARY=$(jq -r --arg version "$VERSION_NUMBER" 'map(select(.version == $version))[0].summary // "详见更新日志"' docs/public/changelogs/cn.json 2>/dev/null || echo "详见更新日志")
|
||||
EN_SUMMARY=$(jq -r --arg version "$VERSION_NUMBER" 'map(select(.version == $version))[0].summary // "See changelog for details"' changelogs/en.json 2>/dev/null || echo "See changelog for details")
|
||||
CN_SUMMARY=$(jq -r --arg version "$VERSION_NUMBER" 'map(select(.version == $version))[0].summary // "详见更新日志"' changelogs/cn.json 2>/dev/null || echo "详见更新日志")
|
||||
|
||||
echo "EN summary: $EN_SUMMARY"
|
||||
echo "CN summary: $CN_SUMMARY"
|
||||
@@ -356,7 +356,7 @@ jobs:
|
||||
echo ""
|
||||
echo "---"
|
||||
echo ""
|
||||
echo "Full Changelog: [English](https://github.com/ChatLab/ChatLab/blob/main/docs/public/changelogs/en.json) | [中文](https://github.com/ChatLab/ChatLab/blob/main/docs/public/changelogs/cn.json) | [日本語](https://github.com/ChatLab/ChatLab/blob/main/docs/public/changelogs/ja.json)"
|
||||
echo "Full Changelog: [English](https://github.com/ChatLab/ChatLab/blob/main/changelogs/en.json) | [中文](https://github.com/ChatLab/ChatLab/blob/main/changelogs/cn.json) | [日本語](https://github.com/ChatLab/ChatLab/blob/main/changelogs/ja.json)"
|
||||
echo ""
|
||||
echo "---"
|
||||
echo ""
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
name: Sync docs to chatlab.fun
|
||||
name: Sync changelogs to chatlab.fun
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches: [main]
|
||||
paths:
|
||||
- 'docs/**'
|
||||
- 'changelogs/**'
|
||||
|
||||
jobs:
|
||||
sync:
|
||||
@@ -13,7 +14,7 @@ jobs:
|
||||
- name: Checkout ChatLab
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
sparse-checkout: docs
|
||||
sparse-checkout: changelogs
|
||||
|
||||
- name: Checkout chatlab.fun
|
||||
uses: actions/checkout@v4
|
||||
@@ -22,18 +23,10 @@ jobs:
|
||||
token: ${{ secrets.CHATLAB_FUN_TOKEN }}
|
||||
path: chatlab-fun
|
||||
|
||||
- name: Sync docs
|
||||
- name: Sync changelogs
|
||||
run: |
|
||||
rsync -av --delete \
|
||||
--exclude='.vitepress' \
|
||||
--exclude='public' \
|
||||
--exclude='README*' \
|
||||
docs/ chatlab-fun/docs/
|
||||
|
||||
- name: Sync public assets
|
||||
run: |
|
||||
rsync -av \
|
||||
docs/public/ chatlab-fun/public/
|
||||
changelogs/ chatlab-fun/public/changelogs/
|
||||
|
||||
- name: Commit and push
|
||||
id: push
|
||||
@@ -41,12 +34,12 @@ jobs:
|
||||
run: |
|
||||
git config user.name "github-actions[bot]"
|
||||
git config user.email "github-actions[bot]@users.noreply.github.com"
|
||||
git add docs/ public/
|
||||
git add public/changelogs/
|
||||
if git diff --cached --quiet; then
|
||||
echo "No changes to commit"
|
||||
echo "pushed=false" >> $GITHUB_OUTPUT
|
||||
else
|
||||
git commit -m "sync: update docs from ChatLab@${GITHUB_SHA::7}"
|
||||
git commit -m "sync: update changelogs from ChatLab@${GITHUB_SHA::7}"
|
||||
git push
|
||||
echo "pushed=true" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
Reference in new issue
Block a user