Skip to content

Commit

Permalink
feat: 添加 CI 自动发布
Browse files Browse the repository at this point in the history
  • Loading branch information
chenlang committed Nov 4, 2024
1 parent 19cd4ee commit 046d9b3
Show file tree
Hide file tree
Showing 6 changed files with 2,063 additions and 454 deletions.
29 changes: 29 additions & 0 deletions .releaserc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
module.exports = {
repositoryUrl: "https://github.com/chennlang/walk-tree-list.git",
branches: ["master"], // 指定在哪个分支下要执行发布操作
dryRun: true,
plugins: [
// 1. 解析 commit 信息,默认就是 Angular 规范
"@semantic-release/commit-analyzer",
// 2. 生成发布信息
"@semantic-release/release-notes-generator",
// 3. 把发布日志写入该文件
[
"@semantic-release/changelog",
{
changelogFile: "CHANGELOG.md",
},
],
// 4. 发布 NPM
"@semantic-release/npm",
// 5. 将变更发布到 GitHub Release
"@semantic-release/github",
// 6. 前面说到日志记录和版本号是新增修改的,需要 push 回 Git
[
"@semantic-release/git",
{
assets: ["CHANGELOG.md", "package.json"],
},
],
],
};
3 changes: 3 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"recommendations": []
}
38 changes: 22 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,35 +1,41 @@
{
"name": "walk-tree-list",
"version": "1.2.0",
"version": "1.4.0",
"description": "Traversing tree nodes",
"keywords": [
"tree",
"walk-tree-list",
"walk-tree",
"tree-list",
"traverse"
],
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build": "rollup --config rollup.config.ts --configPlugin typescript"
},
"bugs": {
"url": "https://github.com/chennlang/walk-tree-list/issues"
},
"homepage": "https://github.com/chennlang/walk-tree-list#readme",
"author": "chennlang",
"license": "ISC",
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs",
"require": "./dist/index.cjs"
}
},
"main": "dist/index.cjs",
"module": "dist/index.es",
"types": "dist/index.d.ts",
"files": [
"dist"
],
"publishConfig": {
"access": "public"
},
"keywords": [
"tree",
"walk-tree-list",
"walk-tree",
"tree-list",
"traverse"
],
"devDependencies": {
"@rollup/plugin-typescript": "^11.1.6",
"rollup": "^4.18.0"
"@semantic-release/changelog": "^6.0.3",
"@semantic-release/git": "^10.0.1",
"@semantic-release/github": "^11.0.0",
"@semantic-release/npm": "^12.0.1",
"@semantic-release/release-notes-generator": "^14.0.1",
"rollup": "^4.18.0",
"semantic-release": "^24.2.0"
}
}
Loading

0 comments on commit 046d9b3

Please sign in to comment.