Skip to content

Commit

Permalink
Merge pull request #5 from dolliejs/dev
Browse files Browse the repository at this point in the history
add publish script and optimize ci workflow
  • Loading branch information
lenconda authored Jul 1, 2021
2 parents 3f94cfe + 5d4f9d6 commit 8e51235
Show file tree
Hide file tree
Showing 12 changed files with 18,855 additions and 18 deletions.
16 changes: 7 additions & 9 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ jobs:
steps:
- checkout
- run: npm install
- run: npm i lerna -g
- run: lerna bootstrap
- run: npx lerna bootstrap
- run: npm run checksum
- save_cache:
paths:
Expand All @@ -34,9 +33,9 @@ jobs:
keys:
- v1-dependencies-{{ checksum "checksum.txt" }}
- v1-dependencies-
- run: ls -al
- run: npm run build
- run: ls -al
- run: ls -al packages/@dollie/core
- run: npx lerna run build
- run: ls -al packages/@dollie/core
- save_cache:
paths:
- node_modules
Expand All @@ -63,7 +62,7 @@ jobs:
- v1-dependencies-
- run: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/repo/.npmrc
- run: ls -al
- run: npm publish --access public
- run: npm run publish

deploy_docs:
<<: *defaults
Expand Down Expand Up @@ -97,10 +96,9 @@ workflows:
filters:
tags:
only:
- /^v.*/
- /^dollie@(\d+)\.(\d+)\.(\d+).*/
branches:
only:
- master
ignore: /.*/
- deploy_docs:
requires:
- install
Expand Down
37 changes: 33 additions & 4 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,29 @@ $ git clone [email protected]:dolliejs/dollie.git
$ cd dollie && npm i && lerna bootstrap
```

## Flow Management

### For Core Contributors

#### New Feature

1. Checkout a new branch from `master`, name it as `feat/<name>`
2. Commit code to this branch
3. Make a Pull Request that merge from your branch to `master`

#### Hot Fixes

1. Checkout a new branch from `master`, name it as `hotfix/<name>`
2. Fix bugs and commit code to this branch
3. Make a Pull Request to `master`
4. Merge and tag a new version in `dollie@<number>.<number>.<number>` format

### For Normal Contributors

1. Fork this project to your namespace
2. Commit code and push to your forked origin
3. Make a Pull Request, merge from your repo to `master` branch of `dolliejs/dollie`

## Start Developing

We provide a lot of examples, you can run the examples:
Expand All @@ -55,18 +78,24 @@ $ npm link
$ dollie init foo bar
```

## Generate New Version & Publish
## Generate New Version

```bash
# execute in your feature branch
$ lerna version {major}.{minor}.{patch} --no-git-tag-version
```

1. **Checkout to `master` branch**
2. Run `lerna version {major}.{minor}.{patch}`
Then commit the changes and push to remote origin.

> Please note that the version must follow the following conventions:
> The version is seperated by `major`, `minor` and `patch` parts:
> 1. `major` means major updates, usually represents the API changes or some APIs are deleted
> 2. `minor` means the new version add some new APIs or refactor the existed APIs
> 3. `patch` means some bugs are fixed
After Lerna pushing the new tags to remote origin, the CI workflow will start automatically to build and publish the new version to NPM.
## Publish Packages

> NOTE: Only core contributors can publish packages, by merging from other branch to `master` and add a tag in `dollie@<number>.<number>.<number>` format. After a commit on `master` is beeing tagged, the CI will build and publish all packages automatically.
## Pull Request Guidelines

Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ temp
.version
.versions
.changelog
package-lock.json
.idea
test.ts
lib
Expand Down
2 changes: 1 addition & 1 deletion docs/README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ features:
- title: 云端化
desc: 通过云端托管模板,以及模板与生成器分离的设计,极大提升模板升级迭代的灵活性
- title: 易上手
desc: 模板配置项简单,易于理解,较短的学习时间即可上手;编写极少代码甚至无需编写代码即可快速制作脚手架
desc: 模板配置项简单,易于理解,花费较短的学习时间即可上手;编写极少代码甚至无需编写代码即可快速制作脚手架
- title: 增量覆盖
desc: 支持通过扩展模板增量覆盖,从而使定制与选择模板技术栈更加方便快捷
footer:
Expand Down
Loading

0 comments on commit 8e51235

Please sign in to comment.