Skip to content

Commit 01e5e6b

Browse files
committed
ci: 更新开放源代码许可信息文件
- 修改 GitHub Actions 工作流文件,增加对不同 Windows 版本的支持 - 更新文件比较逻辑,以适应不同的操作系统版本 - 优化 pull request 标题和内容,使其更加准确描述更新内容 - 添加 Mulan PSL v2 许可证信息到工作流文件
1 parent f6f439b commit 01e5e6b

File tree

1 file changed

+17
-5
lines changed

1 file changed

+17
-5
lines changed

.github/workflows/update-oss-licenses-dist.yml

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
# https://github.com/ArcticFoxPro/wechat-miniprogram-oss-licenses-semiauto-gen
2+
3+
# Copyright (c) 2025 ArcticFoxPro
4+
# WeChat MiniProgram OSS Licenses Semi-Auto Gen is licensed under Mulan PSL v2.
5+
# You can use this software according to the terms and conditions of the Mulan PSL v2.
6+
# You may obtain a copy of Mulan PSL v2 at:
7+
# http://license.coscl.org.cn/MulanPSL2
8+
# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
9+
# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
10+
# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
11+
# See the Mulan PSL v2 for more details.
12+
113
name: Update OSS Licenses Dist
214

315
on:
@@ -9,7 +21,7 @@ jobs:
921
update-oss-licenses-dist:
1022
strategy:
1123
matrix:
12-
os: [ macos-latest ]
24+
os: [ windows-latest ] # 请根据您的微信小程序开发环境配置相应系统(如 `macos-latest`、`ubuntu-latest` 等),因为部分 npm 包在不同系统环境下分发的包名不一致
1325
runs-on: ${{ matrix.os }}
1426
permissions:
1527
contents: write
@@ -37,7 +49,7 @@ jobs:
3749
run: git fetch origin main
3850

3951
- name: Compare files (Windows)
40-
if: matrix.os == 'windows-latest'
52+
if: matrix.os == 'windows-latest' || matrix.os == 'windows-2019' || matrix.os == 'windows-2022'
4153
id: compare-files-windows
4254
run: |
4355
if ! git diff --exit-code origin/main; then
@@ -48,7 +60,7 @@ jobs:
4860
shell: bash
4961

5062
- name: Compare files
51-
if: matrix.os != 'windows-latest'
63+
if: matrix.os != 'windows-latest' && matrix.os != 'windows-2019' && matrix.os != 'windows-2022'
5264
id: compare-files
5365
run: |
5466
if ! git diff --exit-code origin/main; then
@@ -61,8 +73,8 @@ jobs:
6173
if: env.files_changed == 'true'
6274
uses: peter-evans/create-pull-request@v4
6375
with:
64-
title: '更新开源许可证信息'
65-
body: '自动化更新 npm 依赖项的开放源代码信息'
76+
title: '更新开放源代码许可信息文件'
77+
body: '自动化更新 npm 依赖项的开放源代码许可信息文件'
6678
branch: 'update-licenses'
6779
commit-message: 'Update OSS Licenses Dist'
6880
labels: 'auto-generated'

0 commit comments

Comments
 (0)