@icebreakers/monorepo-templates 2.3.1 → 2.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/.github/workflows/release.yml +64 -3
- package/assets/gitignore +2 -0
- package/assets/package.json +3 -1
- package/assets/renovate.json +2 -0
- package/assets/repoctl.config.ts +5 -0
- package/package.json +1 -1
- package/templates/vitepress/learn/tools/renovate.md +3 -1
- package/templates/vitepress/zh/learn/tools/renovate.md +13 -14
|
@@ -95,7 +95,6 @@ jobs:
|
|
|
95
95
|
with:
|
|
96
96
|
node-version: 24
|
|
97
97
|
cache: pnpm
|
|
98
|
-
registry-url: https://registry.npmjs.org
|
|
99
98
|
|
|
100
99
|
- name: Install npm with trusted publishing support
|
|
101
100
|
run: npm install --global npm@11.16.0 --registry=https://registry.npmjs.org
|
|
@@ -103,7 +102,8 @@ jobs:
|
|
|
103
102
|
- name: Install Dependencies
|
|
104
103
|
run: pnpm install --frozen-lockfile
|
|
105
104
|
|
|
106
|
-
- name:
|
|
105
|
+
- name: Release plan
|
|
106
|
+
id: release-plan
|
|
107
107
|
env:
|
|
108
108
|
GITHUB_TOKEN: ${{ steps.app-token.outputs.token || secrets.REPOCTL_RELEASE_TOKEN || secrets.CHANGESETS_RELEASE_TOKEN || github.token }}
|
|
109
109
|
REPO_RELEASE_MODE: ${{ inputs.mode || 'auto' }}
|
|
@@ -111,7 +111,67 @@ jobs:
|
|
|
111
111
|
REPO_RELEASE_VERSION: ${{ inputs.version }}
|
|
112
112
|
REPO_RELEASE_DRY_RUN: ${{ inputs.dry-run }}
|
|
113
113
|
REPO_RELEASE_RECOVERY_SOURCE_SHA: ${{ inputs.source-sha }}
|
|
114
|
-
run: pnpm exec repo release ci
|
|
114
|
+
run: pnpm exec repo release ci --stage plan
|
|
115
|
+
|
|
116
|
+
- name: Release verify
|
|
117
|
+
id: release-verify
|
|
118
|
+
if: ${{ steps.release-plan.outputs.run == 'true' }}
|
|
119
|
+
env:
|
|
120
|
+
GITHUB_TOKEN: ${{ steps.app-token.outputs.token || secrets.REPOCTL_RELEASE_TOKEN || secrets.CHANGESETS_RELEASE_TOKEN || github.token }}
|
|
121
|
+
REPO_RELEASE_MODE: ${{ inputs.mode || 'auto' }}
|
|
122
|
+
REPO_RELEASE_PACKAGE: ${{ inputs.package }}
|
|
123
|
+
REPO_RELEASE_VERSION: ${{ inputs.version }}
|
|
124
|
+
REPO_RELEASE_DRY_RUN: ${{ inputs.dry-run }}
|
|
125
|
+
REPO_RELEASE_RECOVERY_SOURCE_SHA: ${{ inputs.source-sha }}
|
|
126
|
+
run: pnpm exec repo release ci --stage verify
|
|
127
|
+
|
|
128
|
+
- name: Release prepare
|
|
129
|
+
id: release-prepare
|
|
130
|
+
if: ${{ steps.release-plan.outputs.run == 'true' }}
|
|
131
|
+
env:
|
|
132
|
+
GITHUB_TOKEN: ${{ steps.app-token.outputs.token || secrets.REPOCTL_RELEASE_TOKEN || secrets.CHANGESETS_RELEASE_TOKEN || github.token }}
|
|
133
|
+
REPO_RELEASE_MODE: ${{ inputs.mode || 'auto' }}
|
|
134
|
+
REPO_RELEASE_PACKAGE: ${{ inputs.package }}
|
|
135
|
+
REPO_RELEASE_VERSION: ${{ inputs.version }}
|
|
136
|
+
REPO_RELEASE_DRY_RUN: ${{ inputs.dry-run }}
|
|
137
|
+
REPO_RELEASE_RECOVERY_SOURCE_SHA: ${{ inputs.source-sha }}
|
|
138
|
+
run: pnpm exec repo release ci --stage prepare
|
|
139
|
+
|
|
140
|
+
- name: Release upload
|
|
141
|
+
id: release-upload
|
|
142
|
+
if: ${{ steps.release-prepare.outputs.publish == 'true' }}
|
|
143
|
+
env:
|
|
144
|
+
GITHUB_TOKEN: ${{ steps.app-token.outputs.token || secrets.REPOCTL_RELEASE_TOKEN || secrets.CHANGESETS_RELEASE_TOKEN || github.token }}
|
|
145
|
+
REPO_RELEASE_MODE: ${{ inputs.mode || 'auto' }}
|
|
146
|
+
REPO_RELEASE_PACKAGE: ${{ inputs.package }}
|
|
147
|
+
REPO_RELEASE_VERSION: ${{ inputs.version }}
|
|
148
|
+
REPO_RELEASE_DRY_RUN: ${{ inputs.dry-run }}
|
|
149
|
+
REPO_RELEASE_RECOVERY_SOURCE_SHA: ${{ inputs.source-sha }}
|
|
150
|
+
run: pnpm exec repo release ci --stage upload
|
|
151
|
+
|
|
152
|
+
- name: Release confirm
|
|
153
|
+
id: release-confirm
|
|
154
|
+
if: ${{ steps.release-prepare.outputs.publish == 'true' }}
|
|
155
|
+
env:
|
|
156
|
+
GITHUB_TOKEN: ${{ steps.app-token.outputs.token || secrets.REPOCTL_RELEASE_TOKEN || secrets.CHANGESETS_RELEASE_TOKEN || github.token }}
|
|
157
|
+
REPO_RELEASE_MODE: ${{ inputs.mode || 'auto' }}
|
|
158
|
+
REPO_RELEASE_PACKAGE: ${{ inputs.package }}
|
|
159
|
+
REPO_RELEASE_VERSION: ${{ inputs.version }}
|
|
160
|
+
REPO_RELEASE_DRY_RUN: ${{ inputs.dry-run }}
|
|
161
|
+
REPO_RELEASE_RECOVERY_SOURCE_SHA: ${{ inputs.source-sha }}
|
|
162
|
+
run: pnpm exec repo release ci --stage confirm
|
|
163
|
+
|
|
164
|
+
- name: Release finalize
|
|
165
|
+
id: release-finalize
|
|
166
|
+
if: ${{ steps.release-prepare.outputs.publish == 'true' }}
|
|
167
|
+
env:
|
|
168
|
+
GITHUB_TOKEN: ${{ steps.app-token.outputs.token || secrets.REPOCTL_RELEASE_TOKEN || secrets.CHANGESETS_RELEASE_TOKEN || github.token }}
|
|
169
|
+
REPO_RELEASE_MODE: ${{ inputs.mode || 'auto' }}
|
|
170
|
+
REPO_RELEASE_PACKAGE: ${{ inputs.package }}
|
|
171
|
+
REPO_RELEASE_VERSION: ${{ inputs.version }}
|
|
172
|
+
REPO_RELEASE_DRY_RUN: ${{ inputs.dry-run }}
|
|
173
|
+
REPO_RELEASE_RECOVERY_SOURCE_SHA: ${{ inputs.source-sha }}
|
|
174
|
+
run: pnpm exec repo release ci --stage finalize
|
|
115
175
|
|
|
116
176
|
- name: Preserve npm publish progress
|
|
117
177
|
if: ${{ always() }}
|
|
@@ -122,6 +182,7 @@ jobs:
|
|
|
122
182
|
pnpm-publish-summary.json
|
|
123
183
|
repoctl-publish-progress.json
|
|
124
184
|
repoctl-release-progress.json
|
|
185
|
+
repoctl-ci-progress.json
|
|
125
186
|
if-no-files-found: ignore
|
|
126
187
|
retention-days: 14
|
|
127
188
|
|
package/assets/gitignore
CHANGED
package/assets/package.json
CHANGED
|
@@ -50,7 +50,9 @@
|
|
|
50
50
|
"postinstall": "pnpm run build",
|
|
51
51
|
"commit": "commit",
|
|
52
52
|
"commitlint": "commitlint --edit",
|
|
53
|
-
"sync": "
|
|
53
|
+
"sync": "pnpm sync:npmmirror",
|
|
54
|
+
"sync:npmmirror": "repo release sync-npmmirror --all",
|
|
55
|
+
"release:sync-npmmirror": "repo release sync-npmmirror --published",
|
|
54
56
|
"inspector": "npx @eslint/config-inspector",
|
|
55
57
|
"build:inspector": "pnpm build && npx @eslint/config-inspector build",
|
|
56
58
|
"-------": "---------------",
|
package/assets/renovate.json
CHANGED
|
@@ -6,6 +6,8 @@
|
|
|
6
6
|
":semanticCommitTypeAll(chore)"
|
|
7
7
|
],
|
|
8
8
|
"rangeStrategy": "bump",
|
|
9
|
+
"minimumReleaseAge": "7 days",
|
|
10
|
+
"internalChecksFilter": "strict",
|
|
9
11
|
"gitIgnoredAuthors": [
|
|
10
12
|
"41898282+github-actions[bot]@users.noreply.github.com",
|
|
11
13
|
"335527025+auto-upgrade-deps[bot]@users.noreply.github.com"
|
package/assets/repoctl.config.ts
CHANGED
|
@@ -2,6 +2,11 @@ import type { MonorepoConfig } from 'repoctl'
|
|
|
2
2
|
|
|
3
3
|
export default {
|
|
4
4
|
commands: {
|
|
5
|
+
release: {
|
|
6
|
+
hooks: {
|
|
7
|
+
afterPublish: [{ script: 'release:sync-npmmirror', continueOnError: true, idempotent: true }],
|
|
8
|
+
},
|
|
9
|
+
},
|
|
5
10
|
create: {
|
|
6
11
|
defaultTemplate: 'tsdown',
|
|
7
12
|
renameJson: false,
|
package/package.json
CHANGED
|
@@ -8,12 +8,14 @@ Renovate keeps dependencies current through reviewable pull requests. It is most
|
|
|
8
8
|
{
|
|
9
9
|
"extends": ["config:recommended", "group:allNonMajor"],
|
|
10
10
|
"rangeStrategy": "bump",
|
|
11
|
+
"minimumReleaseAge": "7 days",
|
|
12
|
+
"internalChecksFilter": "strict",
|
|
11
13
|
"automerge": true,
|
|
12
14
|
"automergeType": "pr"
|
|
13
15
|
}
|
|
14
16
|
```
|
|
15
17
|
|
|
16
|
-
The repository groups compatible minor and patch updates. Cloudflare Workers tooling is grouped separately because Wrangler and its Vite plugin have a deliberate compatibility relationship.
|
|
18
|
+
The repository groups compatible minor and patch updates. Cloudflare Workers tooling is grouped separately because Wrangler and its Vite plugin have a deliberate compatibility relationship. Renovate waits seven days after each version is published before it can create an update branch or pull request. `internalChecksFilter: "strict"` keeps the stability check blocking, so a pending `renovate/stability-days` check does not appear as a pull request yet. The timer is evaluated for each version independently; it does not require a package to stop publishing for seven days. Security updates follow the same seven-day wait so every automated update gets the same validation window.
|
|
17
19
|
|
|
18
20
|
## Review an update
|
|
19
21
|
|
|
@@ -52,25 +52,24 @@ npx renovate
|
|
|
52
52
|
|
|
53
53
|
```json
|
|
54
54
|
{
|
|
55
|
-
"extends": ["config:
|
|
56
|
-
"
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
{
|
|
62
|
-
"matchUpdateTypes": ["major"],
|
|
63
|
-
"automerge": false
|
|
64
|
-
}
|
|
65
|
-
]
|
|
55
|
+
"extends": ["config:recommended", "group:allNonMajor"],
|
|
56
|
+
"rangeStrategy": "bump",
|
|
57
|
+
"minimumReleaseAge": "7 days",
|
|
58
|
+
"internalChecksFilter": "strict",
|
|
59
|
+
"automerge": true,
|
|
60
|
+
"automergeType": "pr"
|
|
66
61
|
}
|
|
67
62
|
```
|
|
68
63
|
|
|
69
64
|
解释:
|
|
70
65
|
|
|
71
|
-
-
|
|
72
|
-
-
|
|
73
|
-
-
|
|
66
|
+
- 使用推荐配置,并将兼容的非 major 更新分组。
|
|
67
|
+
- `"rangeStrategy": "bump"` 让版本范围随升级一起更新。
|
|
68
|
+
- `"minimumReleaseAge": "7 days"` 要求每个新版本发布满 7 天后才进入升级候选。
|
|
69
|
+
- `"internalChecksFilter": "strict"` 让 `renovate/stability-days` 稳定性检查保持阻塞状态;检查通过前不会创建升级分支或 PR。
|
|
70
|
+
- `"automerge": true` 和 `"automergeType": "pr"` 允许通过检查的升级 PR 自动合并。
|
|
71
|
+
|
|
72
|
+
Renovate 按版本分别计时:它等待的是当前版本发布后的 7 天,而不是等待这个包连续 7 天没有新发布。安全更新也遵循相同的 7 天等待窗口,确保自动升级都经过一致的验证时间。
|
|
74
73
|
|
|
75
74
|
### 实际效果
|
|
76
75
|
|