Skip to content

Commit 6bf4f40

Browse files
author
vicwjb
committed
更新 README.md,添加 GitHub Actions 自动打包及上传 NuGet 的使用说明
1 parent 41222e5 commit 6bf4f40

1 file changed

Lines changed: 39 additions & 0 deletions

File tree

readme.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,42 @@ IFoxCAD的API文档请看 **[IFoxCAD API 文档](https://inspirefunction.github.
4747
- 帮助开发人员编写使用文档,文档地址见 **[IFoxCAD类库从入门到精通](https://www.kdocs.cn/l/cc6ZXSa0vMgD)**
4848
- fork本项目,修复bug,增加功能,并提交pr。
4949

50+
#### 六、使用 GitHub Actions 自动打包,并上传nuget
51+
- 添加GitHub远程仓库
52+
```
53+
git remote add upstream https://github.com/InspireFunction/IFoxCAD.git
54+
55+
```
56+
这时输入命令 `git remote -v` ,你的远程仓库设置应该是这样的:
57+
```
58+
origin https://gitee.com/inspirefunction/ifoxcad.git (fetch)
59+
origin https://gitee.com/inspirefunction/ifoxcad.git (push)
60+
upstream https://github.com/InspireFunction/IFoxCAD.git (fetch)
61+
upstream https://github.com/InspireFunction/IFoxCAD.git (push)
62+
```
63+
其中 origin 是你的主远程仓库, upstream 是你的GitHub远程仓库。
64+
65+
- 拉取远程仓库
66+
```
67+
git fetch upstream
68+
```
69+
- 合并远程仓库到本地分支
70+
```
71+
git merge upstream/v0.9
72+
```
73+
注意合并的时候,一定要在v0.9分支。
74+
75+
处理冲突,确保没有问题,就可以随意的修改代码,提交。
76+
77+
- 提交到GitHub,自动打包
78+
79+
当你要更新版本的时候,只要修改 Directory.Build.props 里的版本号,然后提交。
80+
81+
推送所有的提交到远程仓库。
82+
83+
```
84+
git push origin // 提交到主远程仓库
85+
86+
git push upstream // 提交到GitHub
87+
```
88+
当代码提交到GitHub后,就会触发GitHub Actions,然后自动打包,自动上传到nuget。

0 commit comments

Comments
 (0)