1212
1313自动跑 Lint 和 Cov 单测
1414
15- > 参考示例:https://github.com/artus-cli/examples/actions
16-
15+ > 参考示例:< https://github.com/artus-cli/examples/actions >
1716
1817- 配置 ` npm scripts ` :
1918
4039 pull_request :
4140 branches : [ master, main, next, beta, '*.x' ]
4241
43- schedule :
44- - cron : ' 0 2 * * *'
45-
4642 workflow_dispatch : {}
4743
4844jobs :
4945 Job :
5046 name : Node.js
51- uses : artusjs /github-actions/.github/workflows/node-test.yml@v1
47+ uses : node-modules /github-actions/.github/workflows/node-test.yml@master
5248 # 支持以下自定义配置,一般用默认值即可
5349 # with:
5450 # os: 'ubuntu-latest, macos-latest, windows-latest'
5551 # version: '16, 18'
5652```
5753
54+ ### 开启 MySQL 和 Redis 服务依赖
55+
56+ ``` yaml
57+ name : CI
58+
59+ on :
60+ push :
61+ branches : [ master ]
62+
63+ pull_request :
64+ branches : [ master ]
65+
66+ workflow_dispatch : {}
67+
68+ jobs :
69+ Job :
70+ name : Node.js
71+ uses : node-modules/github-actions/.github/workflows/node-test-mysql.yml@master
72+ with :
73+ os : ' ubuntu-latest'
74+ ` ` `
75+
5876## 发布 NPM 包
5977
6078使用 [semantic-release](https://semantic-release.gitbook.io/) 自动发布 NPM 包。
@@ -75,17 +93,18 @@ jobs:
7593# ## 版本号规则
7694
7795根据 Commit Message 自动计算下一个版本号:
78- - major 大版本:` BREAKING CHANGE `
79- - minor 特性版本: ` feat: ` 等
80- - patch 补丁版本:` fix: ` 等
81- - 不发布版本: ` chore: ` / ` docs: ` / ` style: ` 等
82- - 详见:https://github.com/semantic-release/commit-analyzer
96+
97+ - major 大版本:`BREAKING CHANGE`
98+ - minor 特性版本: `feat:` 等
99+ - patch 补丁版本:`fix:` 等
100+ - 不发布版本: `chore:` / `docs:` / `style:` 等
101+ - 详见:<https://github.com/semantic-release/commit-analyzer>
83102
84103**注意:**
85- - 不支持发布 0.x 版本,master 首次发布将是 1.0.0 版本
86- - 如果你不期望直接发布,请在 beta 分支提交代码运行,将发布 ` 1.0.0-beta.1 ` 版本
87- - 多版本发布实践参见 [ semantic-release] ( https://semantic-release.gitbook.io/semantic-release/recipes/release-workflow/distribution-channels ) 文档
88104
105+ - 不支持发布 0.x 版本,master 首次发布将是 1.0.0 版本
106+ - 如果你不期望直接发布,请在 beta 分支提交代码运行,将发布 `1.0.0-beta.1` 版本
107+ - 多版本发布实践参见 [semantic-release](https://semantic-release.gitbook.io/semantic-release/recipes/release-workflow/distribution-channels) 文档
89108
90109# ## 配置方式
91110
116135jobs:
117136 release:
118137 name: Node.js
119- uses : artusjs /github-actions/.github/workflows/node-release.yml@v1
138+ uses: node-modules /github-actions/.github/workflows/node-release.yml@master
120139 secrets:
121140 NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
122141 GIT_TOKEN: ${{ secrets.GIT_TOKEN }}
0 commit comments