From ab5e7dd66808e8ab1ad4c0029b0fd8774a487722 Mon Sep 17 00:00:00 2001
From: lvsi <15239928381@163.com>
Date: Fri, 16 Sep 2022 18:12:41 +0800
Subject: [PATCH 1/2] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E8=87=AA=E5=8A=A8?=
=?UTF-8?q?=E6=89=93=E5=8C=85=E5=9C=A8release=E5=88=86=E6=94=AF=E6=97=B6?=
=?UTF-8?q?=E8=A7=A6=E5=8F=91?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.github/CONTRIBUTING.md | 52 +++++++++++++++++++++++++++++++++++
.github/workflows/release.yml | 4 +--
README.md | 1 +
3 files changed, 55 insertions(+), 2 deletions(-)
create mode 100644 .github/CONTRIBUTING.md
diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md
new file mode 100644
index 0000000..941d8ab
--- /dev/null
+++ b/.github/CONTRIBUTING.md
@@ -0,0 +1,52 @@
+### 目录
+- [1、如何报告问题](#1)
+- [2、如何提交PR](#2)
+- [3、如何理解项目](#3)
+- [4、代码提交规约](#4)
+- [1、单测通过](#41)
+- [2、commit message 规范](#42)
+- [3、分支管理](#43)
+- [5、打包Release](#5)
+- [6、项目数据](#6)
+
+## 1、如何报告问题
+如果在了解和使用过程中,有任何疑问,非常欢迎提出宝贵的 [Issue](https://github.com/WGrape/posture/issues/new)
+
+## 2、如何提交PR
+PR的提交不限制范围,如代码、文档等修改均在允许范围内,可 [参考这里](https://github.com/WGrape/posture/pull/26/files) 的PR提交
+
+## 3、如何理解项目
+在[以正确的姿势编写和管理代码](https://github.com/WGrape/Blog/issues/260)文档中详细介绍了本项目产生的背景原因,和功能作用。或许它可以帮助你了解本项目
+
+## 4、代码提交规约
+在提交代码前,至少需要做到以下几项
+
+### (1) 单测通过
+如果有单元测试,则整个项目的单元测试必须通过
+
+### (2) commit message 规范
+规范使用如```fix: 修复commit日志记录的bug```这种组合的提交规范
+- fix: 修复bug相关
+- doc: 文档完善相关
+- refactor: 重大功能重构
+- feat: 新功能、新组件等
+- perf: 性能优化提升相关
+- test: 新增测试或测试相关的修改
+- style: 调整代码格式等对功能和性能无较大影响的修改
+- chore: 构建过程或辅助工具的变动,如dockerfile的修改
+
+### (3) 分支管理
+代码统一先提交合至```test```分支,在review通过后,会根据实际情况选择合入```main```分支或者```release```分支。如果是非重要修改,则只会合入```main```分支。
+
+- ```main``` :主分支
+- ```test``` :测试分支
+- ```release``` :版本发布专用分支,合入```release```分支后会自动打包发布release
+
+### (4) 提交内容注释
+对于重要代码部分,请以评论的方式写清楚原因,可以参考 [fix: 修复push钩子中对特定分支名截取的bug](https://github.com/WGrape/posture/pull/23#pullrequestreview-1110452197)
+
+## 5、打包Release
+本项目设置了自动release发布,不需要手动打包处理。
+
+## 6、项目数据
+
\ No newline at end of file
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 7475182..076abce 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -1,7 +1,7 @@
on:
push:
branches:
- - main
+ - release
name: Release
@@ -15,4 +15,4 @@ jobs:
token: ${{ secrets.RELEASE_TOKEN }}
release-type: node
package-name: posture
- changelog-types: '[{"type": "types", "section":"Types", "hidden": false},{"type": "revert", "section":"Reverts", "hidden": false},{"type": "feat", "section": "Features", "hidden": false},{"type": "fix", "section": "Bug Fixes", "hidden": false},{"type": "improvement", "section": "Feature Improvements", "hidden": false},{"type": "docs", "section":"Docs", "hidden": false},{"type": "style", "section":"Styling", "hidden": false},{"type": "refactor", "section":"Code Refactoring", "hidden": false},{"type": "perf", "section":"Performance Improvements", "hidden": false},{"type": "test", "section":"Tests", "hidden": false},{"type": "build", "section":"Build System", "hidden": false},{"type": "ci", "section":"CI", "hidden":false}]'
+ changelog-types: '[{"type": "types", "section":"Types", "hidden": false},{"type": "revert", "section":"Reverts", "hidden": false},{"type": "feat", "section": "Features", "hidden": false},{"type": "fix", "section": "Bug Fixes", "hidden": false},{"type": "improvement", "section": "Feature Improvements", "hidden": false},{"type": "docs", "section":"Docs", "hidden": false},{"type": "doc", "section":"Docs", "hidden": false},{"type": "style", "section":"Styling", "hidden": false},{"type": "refactor", "section":"Code Refactoring", "hidden": false},{"type": "perf", "section":"Performance Improvements", "hidden": false},{"type": "test", "section":"Tests", "hidden": false},{"type": "build", "section":"Build System", "hidden": false},{"type": "ci", "section":"CI", "hidden":false}]'
diff --git a/README.md b/README.md
index 5e094b5..6d62e15 100644
--- a/README.md
+++ b/README.md
@@ -141,5 +141,6 @@ posture update
# 五、项目贡献
+本项目支持
From c6dcf2772fcdda742be9e63694c9de5723f808a9 Mon Sep 17 00:00:00 2001
From: lvsi <15239928381@163.com>
Date: Fri, 16 Sep 2022 18:17:49 +0800
Subject: [PATCH 2/2] =?UTF-8?q?doc:=20=E5=AE=8C=E5=96=84=E6=96=87=E6=A1=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 6d62e15..4377e36 100644
--- a/README.md
+++ b/README.md
@@ -141,6 +141,6 @@ posture update
# 五、项目贡献
-本项目支持
+如果您觉得项目有用,欢迎star !您还可以参考[如何贡献](./.github/CONTRIBUTING.md)文档来共同参与此项目,欢迎加入 !