diff --git a/.circleci/config.yml b/.circleci/config.yml index e890a21..0bf2cac 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -47,6 +47,9 @@ jobs: command: | npm i npm run ci + - run: + name: Generate CHANGELOG.md + command: npm run changelog - run: name: Publish command: | @@ -54,7 +57,6 @@ jobs: npm version ${CIRCLE_TAG/release-v/} npm publish echo "Publish success!!" - - run: name: Push to Github command: | @@ -75,4 +77,4 @@ workflows: branches: ignore: /.*/ tags: - only: /release-v.*/ + only: /v.*/ diff --git a/git.sh b/git.sh index 7855504..5a88a0d 100755 --- a/git.sh +++ b/git.sh @@ -3,7 +3,7 @@ set -o errexit git config --global user.name "circle-bot" -git config --global user.email "bot@darlin.me" +git config --global user.email "duxiaodong@darlin.me" git status git commit -am"bump version" diff --git a/package.json b/package.json index 27eb6f4..067e9f7 100644 --- a/package.json +++ b/package.json @@ -7,25 +7,28 @@ "types": "lib/index.d.ts", "files": [ "lib", - "src" + "src", + "CHANGELOG.md" ], "scripts": { "clean": "rm -rf coverage && rm -rf lib", "codecov": "cat ./coverage/lcov.info | codecov", "ci": "npm run clean && tsc -d && npm run test", - "test": "jest --coverage" + "test": "jest --coverage", + "changelog": "conventional-changelog -p angular -i CHANGELOG.md -s" }, "author": "doxiaodong", "license": "MIT", "devDependencies": { - "@types/jest": "^23.1.3", - "@types/react": "^16.4.4", + "@types/jest": "^23.1.4", + "@types/react": "^16.4.6", "codecov": "^3.0.2", + "conventional-changelog": "^2.0.1", "jest": "^23.2.0", "mobx": "^5.0.3", "mobx-react": "^5.2.3", "react": "^16.4.1", - "ts-jest": "^22.4.6", + "ts-jest": "^23.0.0", "typescript": "^2.9.2" }, "peerDependencies": {