Skip to content

Commit

Permalink
feat(CHANGELOG): 使用release-it自动管理版本号和生成CHANGELOG
Browse files Browse the repository at this point in the history
  • Loading branch information
baiwumm committed Mar 31, 2024
1 parent 201d38d commit b3ca52b
Show file tree
Hide file tree
Showing 3 changed files with 1,974 additions and 72 deletions.
30 changes: 30 additions & 0 deletions .release-it.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"plugins": {
"@release-it/conventional-changelog": {
"preset": {
"name": "conventionalcommits",
"types": [
{ "type": "feat", "section": "✨ Features | 新功能" },
{ "type": "fix", "section": "🐛 Bug Fixes | Bug 修复" },
{ "type": "chore", "section": "🎫 Chores | 其他更新" },
{ "type": "docs", "section": "📝 Documentation | 文档" },
{ "type": "style", "section": "💄 Styles | 风格" },
{ "type": "refactor", "section": "♻ Code Refactoring | 代码重构" },
{ "type": "perf", "section": "⚡ Performance Improvements | 性能优化" },
{ "type": "test", "section": "✅ Tests | 测试" },
{ "type": "revert", "section": "⏪ Reverts | 回退" },
{ "type": "build", "section": "👷‍ Build System | 构建" },
{ "type": "ci", "section": "🔧 Continuous Integration | CI 配置" }
]
},
"infile": "CHANGELOG.md"
}
},
"git": {
"commitMessage": "chore: Release v${version}"
},
"github": {
"release": true,
"draft": false
}
}
10 changes: 7 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"name": "nuxt-app",
"name": "dream-site",
"private": true,
"type": "module",
"version": "1.0.0",
"scripts": {
"build": "nuxt build",
"dev": "nuxt dev",
Expand All @@ -12,7 +13,8 @@
"checklint": "eslint --ext .js,.vue --ignore-path .gitignore .",
"reviselint": "eslint --fix --ext .js,.vue --ignore-path .gitignore .",
"pre-commit": "lint-staged",
"commitlint": "commitlint --config commitlint.config.cjs -e -V"
"commitlint": "commitlint --config commitlint.config.cjs -e -V",
"release": "release-it"
},
"dependencies": {
"nuxt": "^3.11.1",
Expand All @@ -22,6 +24,7 @@
"devDependencies": {
"@commitlint/cli": "^19.2.1",
"@commitlint/config-conventional": "^19.1.0",
"@release-it/conventional-changelog": "^8.0.1",
"babel-eslint": "^10.1.0",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
Expand All @@ -30,6 +33,7 @@
"eslint-plugin-vue": "^9.24.0",
"husky": "^9.0.11",
"lint-staged": "^15.2.2",
"prettier": "^3.2.5"
"prettier": "^3.2.5",
"release-it": "^17.1.1"
}
}
Loading

0 comments on commit b3ca52b

Please sign in to comment.