From ae778f950595c091308769e2a77d6696c52333cf Mon Sep 17 00:00:00 2001 From: yinyu Date: Wed, 18 Mar 2026 17:56:56 +0800 Subject: [PATCH 1/5] [200_50] Bump Version workflow --- .github/workflows/ci_bump_version.yml | 39 +++++++++++++++++++++++++++ TeXmacs/tests/tmu/206_19.tmu | 6 ++++- 2 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/ci_bump_version.yml diff --git a/.github/workflows/ci_bump_version.yml b/.github/workflows/ci_bump_version.yml new file mode 100644 index 0000000000..09969fa545 --- /dev/null +++ b/.github/workflows/ci_bump_version.yml @@ -0,0 +1,39 @@ +name: CI1 Bump Version + +on: + workflow_dispatch: + inputs: + version: + description: '新版本号 (如 v2026.2.1-rc4)' + required: true + default: 'v2026.2.2' + +jobs: + bump: + runs-on: ubuntu-latest + steps: + - name: Checkout Code + uses: actions/checkout@v4 + with: + token: ${{ secrets.PAT_TOKEN }} # 需要一个具有写权限的个人访问令牌 + + - name: Set new version to env + run: | + echo "NEW_VERSION=${{ github.events.inputs.version }}" >> $GITHUB_ENV + echo "NEW_VERSION_DATE=$(date +'%Y/%m/%d')" >> $GITHUB_ENV + + - name: Update devel/200_22.md + run: | + sed -i '3i## ${{ env.NEW_VERSION_DATE }} ${{ env.NEW_VERSION }} 打包\n' devel/200_22.md + + - name: Update xmake/vars.lua and Git + run: | + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + + sed -i 's/^XMACS_VERSION="[^"]*"/XMACS_VERSION="${{ env.NEW_VERSION }}"/' xmake/vars.lua + + git add . + git commit -m "[200_22] bump to Mogan STEM ${{ env.NEW_VERSION }}" + + git push origin ${{ github.ref_name }} \ No newline at end of file diff --git a/TeXmacs/tests/tmu/206_19.tmu b/TeXmacs/tests/tmu/206_19.tmu index 2e5d3fe327..d5758b188b 100644 --- a/TeXmacs/tests/tmu/206_19.tmu +++ b/TeXmacs/tests/tmu/206_19.tmu @@ -1,4 +1,4 @@ -> +> > @@ -32,6 +32,10 @@ <\equation*> h\i> + + + + \; <\initial> From a1b491c077990d81a4d0a46394fb6ee3046d2d9f Mon Sep 17 00:00:00 2001 From: yinyu Date: Thu, 19 Mar 2026 13:48:58 +0800 Subject: [PATCH 2/5] =?UTF-8?q?[200=5F50]=20=E6=B7=BB=E5=8A=A0=20Bump=20Ve?= =?UTF-8?q?rsion=20workflow?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci_bump_version.yml | 23 ++++++++++++---- devel/200_50.md | 38 +++++++++++++++++++++++++++ 2 files changed, 56 insertions(+), 5 deletions(-) create mode 100644 devel/200_50.md diff --git a/.github/workflows/ci_bump_version.yml b/.github/workflows/ci_bump_version.yml index 09969fa545..5dd286cb1a 100644 --- a/.github/workflows/ci_bump_version.yml +++ b/.github/workflows/ci_bump_version.yml @@ -1,10 +1,10 @@ -name: CI1 Bump Version +name: Bump Version on: workflow_dispatch: inputs: version: - description: '新版本号 (如 v2026.2.1-rc4)' + description: '新版本号 (如 v2026.2.1)' required: true default: 'v2026.2.2' @@ -19,19 +19,32 @@ jobs: - name: Set new version to env run: | - echo "NEW_VERSION=${{ github.events.inputs.version }}" >> $GITHUB_ENV + echo "NEW_VERSION=${{ github.event.inputs.version }}" >> $GITHUB_ENV echo "NEW_VERSION_DATE=$(date +'%Y/%m/%d')" >> $GITHUB_ENV + - name: Validate version format + run: | + VERSION="${{ github.event.inputs.version }}" + if ! echo "$VERSION" | grep -qE '^v[0-9]{4}\.[0-9]{1,2}(\.[0-9]+)?(-rc[0-9]+)?$'; then + echo "版本格式错误,应为 v2026.2.1 或 v2026.2.1-rc1" + exit 1 + fi + + - name: Set version without v + run: | + VERSION="${{ github.event.inputs.version }}" + echo "NEW_VERSION_WITHOUT_V=${VERSION#v}" >> $GITHUB_ENV + - name: Update devel/200_22.md run: | - sed -i '3i## ${{ env.NEW_VERSION_DATE }} ${{ env.NEW_VERSION }} 打包\n' devel/200_22.md + sed -i "3i## ${{ env.NEW_VERSION_DATE }} ${{ env.NEW_VERSION }} 打包" devel/200_22.md - name: Update xmake/vars.lua and Git run: | git config user.name "github-actions[bot]" git config user.email "github-actions[bot]@users.noreply.github.com" - sed -i 's/^XMACS_VERSION="[^"]*"/XMACS_VERSION="${{ env.NEW_VERSION }}"/' xmake/vars.lua + sed -i 's/^XMACS_VERSION="[^"]*"/XMACS_VERSION="${{ env.NEW_VERSION_WITHOUT_V }}"/' xmake/vars.lua git add . git commit -m "[200_22] bump to Mogan STEM ${{ env.NEW_VERSION }}" diff --git a/devel/200_50.md b/devel/200_50.md new file mode 100644 index 0000000000..7ab76c61f8 --- /dev/null +++ b/devel/200_50.md @@ -0,0 +1,38 @@ +# 200_50 Bump Version workflow + +## 触发方式 +- 通过 GitHub Actions 手动触发(workflow_dispatch) +- 输入新版本号(如 v2026.2.2) + +## 版本号规则 +- 格式:`vYYYY.Major.Minor[-rcN]` +- 示例:`v2026.2.1`、`v2026.2.1-rc1` + +## 涉及文件 +- `xmake/vars.lua`:更新 XMACS_VERSION +- `devel/200_22.md`:添加版本发布记录 + +## 2026/03/18 添加 Bump Version workflow + +### What +- 新增 GitHub Actions workflow:`.github/workflows/ci_bump_version.yml` +- 手动触发版本号更新,自动完成以下工作: + 1. 验证版本号格式 + 2. 在 `devel/200_22.md` 第3行插入新版本记录 + 3. 更新 `xmake/vars.lua` 中的 XMACS_VERSION + 4. 自动提交并推送到远程仓库 + +### Why +- 简化版本发布流程,统一管理版本号 +- 确保版本号在多个文件中保持一致 +- 减少手动操作带来的错误 + +### How +1. 在 GitHub 仓库的 Actions 页面,选择 "Bump Version" workflow +2. 点击 "Run workflow" 按钮 +3. 输入新版本号(如 `v2026.2.2`) +4. 点击 "Run workflow" 确认执行 + +### 版本号格式验证 +- 标准格式:`v2026.2.1`、`v2026.2.1-rc1` +- 正则表达式:`^v[0-9]{4}\.[0-9]{1,2}(\.[0-9]+)?(-rc[0-9]+)?$` From 6a6d89a31f16dbb5eec9009620139eb255e4f51f Mon Sep 17 00:00:00 2001 From: yinyu Date: Thu, 19 Mar 2026 14:01:10 +0800 Subject: [PATCH 3/5] fix --- .github/workflows/ci_bump_version.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci_bump_version.yml b/.github/workflows/ci_bump_version.yml index 5dd286cb1a..201343818e 100644 --- a/.github/workflows/ci_bump_version.yml +++ b/.github/workflows/ci_bump_version.yml @@ -6,7 +6,6 @@ on: version: description: '新版本号 (如 v2026.2.1)' required: true - default: 'v2026.2.2' jobs: bump: From ebdf7d9c9a9ba42f4762e80c10c7f0bbf231545d Mon Sep 17 00:00:00 2001 From: yinyu Date: Thu, 19 Mar 2026 15:24:09 +0800 Subject: [PATCH 4/5] ff --- .github/workflows/ci_bump_version.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci_bump_version.yml b/.github/workflows/ci_bump_version.yml index 201343818e..d4c03f2a60 100644 --- a/.github/workflows/ci_bump_version.yml +++ b/.github/workflows/ci_bump_version.yml @@ -47,5 +47,8 @@ jobs: git add . git commit -m "[200_22] bump to Mogan STEM ${{ env.NEW_VERSION }}" + # 打 Tag + git tag ${{ env.NEW_VERSION }} - git push origin ${{ github.ref_name }} \ No newline at end of file + git push origin ${{ github.ref_name }} + git push origin ${{ env.NEW_VERSION }} \ No newline at end of file From 831e9f60b67d57149cf34968bdc63d71708fda32 Mon Sep 17 00:00:00 2001 From: yinyu Date: Thu, 19 Mar 2026 15:56:00 +0800 Subject: [PATCH 5/5] fix --- TeXmacs/tests/tmu/206_19.tmu | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/TeXmacs/tests/tmu/206_19.tmu b/TeXmacs/tests/tmu/206_19.tmu index d5758b188b..2e5d3fe327 100644 --- a/TeXmacs/tests/tmu/206_19.tmu +++ b/TeXmacs/tests/tmu/206_19.tmu @@ -1,4 +1,4 @@ -> +> > @@ -32,10 +32,6 @@ <\equation*> h\i> - - - - \; <\initial>