Skip to content

ci: 添加自动更新 Minecraft 版本的 GitHub Actions 工作流 - #6932

Open
zkitefly wants to merge 9 commits into
HMCL-dev:mainfrom
zkitefly:version.txt
Open

zkitefly wants to merge 9 commits into
HMCL-dev:mainfrom
zkitefly:version.txt

Conversation

@zkitefly

@zkitefly zkitefly commented Oct 2, 2026 •

Copy link
Copy Markdown
Member

新增 GitHub Actions 工作流,每天(北京时间零点)自动从 Mojang 官方版本清单拉取最新 Minecraft 版本,更新版本列表文件,并在有新版本时自动创建 PR。

新增 Chunkbase 更新,从各自的页面用正则表达式匹配版本并更新。

工作流规则:

  1. 各自独立发布 PR。
  2. 如果已有 PR 还未合并,当有新修改时,会直接在还未合并的 PR 的分支上继续提交修改,不会重复添加 PR。
  3. 合并分支后,会自动删除 PR 相应分支。

本地测试命令:

node -e "require('./.github/scripts/update-versions.js')({ github:{}, context:{}, core:{ info:console.log, setFailed:console.error, setOutput:console.log } })"
node -e "require('./.github/scripts/update-chunkbase-versions.js')({ github:{}, context:{}, core:{ info:console.log, setFailed:console.error, setOutput:console.log } })"

效果预览:
zkitefly#24

第一次:https://github.com/zkitefly/HMCL/actions/runs/36994685596/job/110798588332
第二次(未新建新 PR):https://github.com/zkitefly/HMCL/actions/runs/36994985276
第三次(在原有 pr 上提交内容):zkitefly@5d40d7e

新增 GitHub Actions 工作流,每周日自动从 Mojang 官方版本清单拉取最新 Minecraft 版本,更新版本列表文件,并在有新版本时自动创建 PR。
@github-actions github-actions Bot added the 40+ label Oct 2, 2026
commit cccdf05
Author: Zkitefly <zkitefly@foxmail.com>
Date:   Fri Oct 2 14:12:32 2026 +0800

    ci: 更新版本更新工作流以支持更新Chunkbase游戏版本

    新增GitHub Actions工作流和脚本,用于自动从Chunkbase获取最新的Java版游戏版本并更新到资源文件中,同时调整原有工作流的名称以更准确反映其更新Minecraft版本的功能。

commit 9867b38
Author: Zkitefly <zkitefly@foxmail.com>
Date:   Fri Oct 2 13:53:10 2026 +0800

    update

commit 86443ff
Author: Zkitefly <zkitefly@foxmail.com>
Date:   Fri Oct 2 13:33:13 2026 +0800

    feat(chunkbase): 将游戏版本列表改为外部配置文件加载

    将原本硬编码在 ChunkBaseApp 中的游戏版本数组迁移到外部 JSON 配置文件中,通过代码加载配置,提升可维护性,方便后续更新版本列表无需修改代码。
@github-actions github-actions Bot added 100+ and removed 40+ labels Oct 2, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Static analysis found the following issues (max count 10):

Comment thread HMCL/src/main/java/org/jackhuang/hmcl/util/ChunkBaseApp.java
Comment thread .github/workflows/update-versions.yml Outdated
@zkitefly
zkitefly requested a review from Glavo October 2, 2026 09:32

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants