Skip to content

Commit 4bbb272

Browse files
authored
Merge pull request #3 from VisActor/release/0.1.0
[Auto release] release 0.1.0
2 parents 889e267 + 935ca93 commit 4bbb272

12 files changed

Lines changed: 101 additions & 29 deletions

File tree

.github/workflows/release.yml

Lines changed: 45 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,9 +188,46 @@ jobs:
188188
const baseUrl = process.env.CHANGELOG_API_URL;
189189
const token = process.env.CHANGELOG_API_TOKEN;
190190
191+
function collectChanges() {
192+
const changes = [];
193+
for (const changefile of changefiles) {
194+
const items = Array.isArray(changefile.changes) ? changefile.changes : [];
195+
for (const item of items) {
196+
if (item && item.comment) {
197+
changes.push({
198+
packageName: item.packageName || changefile.packageName || 'VGraph',
199+
comment: String(item.comment).trim(),
200+
type: item.type || 'none',
201+
});
202+
}
203+
}
204+
}
205+
return changes;
206+
}
207+
208+
function formatFallbackBlock(lang) {
209+
const changes = collectChanges();
210+
const heading = `# v${version}`;
211+
const section = lang === 'zh' ? '## 更新内容' : '## Updates';
212+
const emptyMessage =
213+
lang === 'zh'
214+
? '- 发布 VGraph packages。'
215+
: '- Release VGraph packages.';
216+
const lines = changes.length > 0
217+
? changes.map(change => `- ${change.comment}`)
218+
: [emptyMessage];
219+
return `${heading}\n\n${section}\n\n${lines.join('\n')}\n`;
220+
}
221+
222+
function writeFallbackChangelog(reason) {
223+
console.warn(`Use fallback changelog generation: ${reason}`);
224+
fs.mkdirSync('.changelog', { recursive: true });
225+
fs.writeFileSync('.changelog/en.md', formatFallbackBlock('en'), 'utf8');
226+
fs.writeFileSync('.changelog/zh.md', formatFallbackBlock('zh'), 'utf8');
227+
}
228+
191229
function failChangelog(message) {
192-
console.error(message);
193-
process.exit(1);
230+
writeFallbackChangelog(message);
194231
}
195232
196233
function validateBlock(block, lang) {
@@ -201,6 +238,7 @@ jobs:
201238
202239
if (!baseUrl || !token) {
203240
failChangelog('CHANGELOG_API_URL or CHANGELOG_API_TOKEN not configured.');
241+
process.exit(0);
204242
}
205243
206244
const url = new URL('/api/changelog/vgraph/generate', baseUrl);
@@ -249,6 +287,11 @@ jobs:
249287
250288
req.on('error', err => {
251289
failChangelog(`Changelog API request failed: ${err.message || err}`);
290+
process.exit(0);
291+
});
292+
293+
req.setTimeout(15000, () => {
294+
req.destroy(new Error('Changelog API request timed out.'));
252295
});
253296
254297
req.write(body);

common/changes/@visactor/vgraph/2026-06-16-release-workflow-bootstrap.json

Lines changed: 0 additions & 11 deletions
This file was deleted.

common/config/rush/pnpm-lock.yaml

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
[{"definitionName":"lockStepVersion","policyName":"vgraphMain","version":"0.1.0","mainProject":"@visactor/vgraph","nextBump":"minor"}]
1+
[{"definitionName":"lockStepVersion","policyName":"vgraphMain","version":"0.2.0","mainProject":"@visactor/vgraph","nextBump":"minor"}]

docs/assets/changelog/en/release.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# v0.1.0
2+
3+
## Updates
4+
5+
- Align release automation, changelog generation, and package publishing metadata with the current VTable and VChart workflows.
6+
17
# Release Log
28

39
VGraph release notes are published here after each stable release.

docs/assets/changelog/zh/release.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# v0.1.0
2+
3+
## 更新内容
4+
5+
- Align release automation, changelog generation, and package publishing metadata with the current VTable and VChart workflows.
6+
17
# 发版记录
28

39
VGraph 的稳定版本发布说明会在这里持续追加。

docs/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
},
1212
"dependencies": {
1313
"@arco-design/web-react": "2.39.3",
14-
"@visactor/vgraph": "workspace:0.1.0-alpha.0",
15-
"@visactor/react-vgraph": "workspace:0.1.0-alpha.0",
16-
"@visactor/react-vgraph-ui": "workspace:0.1.0-alpha.0",
14+
"@visactor/vgraph": "workspace:0.1.0",
15+
"@visactor/react-vgraph": "workspace:0.1.0",
16+
"@visactor/react-vgraph-ui": "workspace:0.1.0",
1717
"buble": "^0.20.0",
1818
"highlight.js": "^11.8.0",
1919
"markdown-it": "^13.0.0",

packages/react-vgraph-ui/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@visactor/react-vgraph-ui",
3-
"version": "0.1.0-alpha.0",
3+
"version": "0.1.0",
44
"description": "React UI components for VGraph",
55
"keywords": [
66
"react",
@@ -58,7 +58,7 @@
5858
"@babel/preset-typescript": "^7.26.0",
5959
"@internal/eslint-config": "workspace:*",
6060
"@rushstack/eslint-patch": "~1.1.4",
61-
"@visactor/vgraph": "workspace:0.1.0-alpha.0",
61+
"@visactor/vgraph": "workspace:0.1.0",
6262
"@testing-library/jest-dom": "^5.16.4",
6363
"@testing-library/react": "12",
6464
"@types/jest": "^27.0.2",
@@ -93,7 +93,7 @@
9393
"worker-loader": "^3.0.8"
9494
},
9595
"peerDependencies": {
96-
"@visactor/vgraph": "^0.1.0-alpha.0",
96+
"@visactor/vgraph": "^0.1.0",
9797
"@arco-design/web-react": "^2.39.3",
9898
"react": ">=16",
9999
"react-dom": ">=16"

packages/react-vgraph/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@visactor/react-vgraph",
3-
"version": "0.1.0-alpha.0",
3+
"version": "0.1.0",
44
"description": "The react version of VGraph",
55
"keywords": [
66
"react",
@@ -56,7 +56,7 @@
5656
"@babel/preset-typescript": "^7.26.0",
5757
"@internal/eslint-config": "workspace:*",
5858
"@rushstack/eslint-patch": "~1.1.4",
59-
"@visactor/vgraph": "workspace:0.1.0-alpha.0",
59+
"@visactor/vgraph": "workspace:0.1.0",
6060
"@testing-library/jest-dom": "^5.16.4",
6161
"@testing-library/react": "12",
6262
"@types/dom-to-image": "^2.6.7",
@@ -94,7 +94,7 @@
9494
"worker-loader": "^3.0.8"
9595
},
9696
"peerDependencies": {
97-
"@visactor/vgraph": "^0.1.0-alpha.0",
97+
"@visactor/vgraph": "^0.1.0",
9898
"react": ">=16",
9999
"react-dom": ">=16"
100100
},

packages/vgraph/CHANGELOG.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"name": "@visactor/vgraph",
3+
"entries": [
4+
{
5+
"version": "0.2.0",
6+
"tag": "@visactor/vgraph_v0.2.0",
7+
"date": "Fri, 26 Jun 2026 03:01:27 GMT",
8+
"comments": {
9+
"minor": [
10+
{
11+
"comment": "Align release automation, changelog generation, and package publishing metadata with the current VTable and VChart workflows."
12+
}
13+
]
14+
}
15+
}
16+
]
17+
}

0 commit comments

Comments
 (0)