Skip to content

fix(initialization): 优化 uv 最新版安装与失败回退 #245

fix(initialization): 优化 uv 最新版安装与失败回退

fix(initialization): 优化 uv 最新版安装与失败回退 #245

# AUTO-MAS: A Multi-Script, Multi-Config Management and Automation Software
# Copyright © 2025-2026 AUTO-MAS Team
# This file is part of AUTO-MAS.
# AUTO-MAS is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of
# the License, or (at your option) any later version.
# AUTO-MAS is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty
# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
# the GNU Affero General Public License for more details.
# You should have received a copy of the GNU Affero General Public License
# along with AUTO-MAS. If not, see <https://www.gnu.org/licenses/>.
# Contact: DLmaster_361@163.com
name: 检查版本信息
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
permissions:
contents: read
pull-requests: read
jobs:
check-version-json:
name: 检查 version.json 变更
runs-on: ubuntu-latest
steps:
- name: 检出代码
uses: actions/checkout@v4
- name: 检查 version.json 语法
run: python -m json.tool res/version.json > /dev/null
- name: 检查 PR 文件列表
uses: actions/github-script@v7
with:
script: |
const files = await github.paginate(github.rest.pulls.listFiles, {
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.issue.number,
per_page: 100,
});
if (!files.some(file => file.filename === 'res/version.json')) {
core.setFailed('每个 PR 都必须包含对 res/version.json 的更改。');
}