fix: 自动化

This commit is contained in:
liushaozhen 2020-04-24 17:14:57 +08:00
parent 60d11df2df
commit 2d96ad07bc
4 changed files with 55 additions and 70 deletions

46
.github/workflows/publish.yml vendored Normal file
View File

@ -0,0 +1,46 @@
on:
push:
tags:
- 'v*'
name: Publish
jobs:
# test:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2
# - uses: actions/setup-node@v1
# with:
# node-version: 10
# - run: npm i -g bee-tools-test
# - run: npm i
# - run: npm test
publish:
# needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 10
registry-url: https://registry.npmjs.org/
- run: npm i -g bee-tools
- run: npm i
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
- uses: iuap-design/actions-ynpm-sync@master
github-release:
needs: publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 10
registry-url: https://registry.npmjs.org/
- run: npm i -g github-release-from-changelog
- run: github-release-from-changelog
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

5
.huskyrc Normal file
View File

@ -0,0 +1,5 @@
{
"hooks": {
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
}
}

3
commitlint.config.js Normal file
View File

@ -0,0 +1,3 @@
module.exports = {
extends: ['@commitlint/config-conventional']
}

View File

@ -1,70 +1 @@
{
"name": "bee-tree",
"version": "2.1.18",
"description": "Tree ui component for react",
"keywords": [
"react",
"react-component",
"bee-tree",
"iuap-design",
"tinper-bee",
"Tree"
],
"engines": {
"node": ">=4.0.0"
},
"homepage": "https://github.com/tinper-bee/bee-tree.git",
"author": "Yonyou FED",
"repository": "http://github.com/tinper-bee/bee-tree",
"bugs": "https://github.com/tinper-bee/bee-tree.git/issues",
"license": "MIT",
"main": "./build/index.js",
"config": {
"port": 3000,
"commitizen": {
"path": "./node_modules/cz-conventional-changelog"
}
},
"scripts": {
"dev": "bee-tools run start",
"build": "bee-tools run build",
"lint": "bee-tools run lint",
"test": "bee-tools run test",
"chrome": "bee-tools run chrome",
"coveralls": "bee-tools run coverage",
"browsers": "bee-tools run browsers",
"pub": "bee-tools run pub",
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0"
},
"dependencies": {
"babel-runtime": "^6.23.0",
"bee-animate": "^1.0.0",
"bee-checkbox": "latest",
"bee-modal": "^2.0.13",
"classnames": "^2.2.5",
"omit.js": "^1.0.2",
"tinper-bee-core": "latest"
},
"peerDependencies": {
"react": "^15.3.0 || ^16.0",
"react-dom": "^15.3.0 || ^16.0",
"prop-types": "15.6.0"
},
"devDependencies": {
"bee-button": "latest",
"bee-clipboard": "latest",
"bee-drawer": "0.0.2",
"bee-form-control": "latest",
"bee-icon": "latest",
"bee-layout": "^1.2.7",
"bee-panel": "latest",
"chai": "^3.5.0",
"console-polyfill": "~0.2.1",
"cz-conventional-changelog": "^2.1.0",
"enzyme": "^2.4.1",
"es5-shim": "~4.1.10",
"react": "16.8.3",
"react-addons-test-utils": "15.6.2",
"react-dom": "16.8.3"
}
}
{"name":"bee-tree","version":"2.1.18","description":"Tree ui component for react","keywords":["react","react-component","bee-tree","iuap-design","tinper-bee","Tree"],"engines":{"node":">=4.0.0"},"homepage":"https://github.com/tinper-bee/bee-tree.git","author":"Yonyou FED","repository":"http://github.com/tinper-bee/bee-tree","bugs":"https://github.com/tinper-bee/bee-tree.git/issues","license":"MIT","main":"./build/index.js","config":{"port":3000,"commitizen":{"path":"./node_modules/cz-conventional-changelog"}},"scripts":{"dev":"bee-tools run start","build":"bee-tools run build","lint":"bee-tools run lint","test":"bee-tools run test","chrome":"bee-tools run chrome","coveralls":"bee-tools run coverage","browsers":"bee-tools run browsers","pub":"bee-tools run pub","changelog":"conventional-changelog -p angular -i CHANGELOG.md -s -r 0","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","postversion":"git push --follow-tags","prepublishOnly":"npm run build"},"dependencies":{"babel-runtime":"^6.23.0","bee-animate":"^1.0.0","bee-checkbox":"latest","bee-modal":"^2.0.13","classnames":"^2.2.5","omit.js":"^1.0.2","tinper-bee-core":"latest"},"peerDependencies":{"react":"^15.3.0 || ^16.0","react-dom":"^15.3.0 || ^16.0","prop-types":"15.6.0"},"devDependencies":{"bee-button":"latest","bee-clipboard":"latest","bee-drawer":"0.0.2","bee-form-control":"latest","bee-icon":"latest","bee-layout":"^1.2.7","bee-panel":"latest","chai":"^3.5.0","console-polyfill":"~0.2.1","cz-conventional-changelog":"^2.1.0","enzyme":"^2.4.1","es5-shim":"~4.1.10","react":"16.8.3","react-addons-test-utils":"15.6.2","react-dom":"16.8.3","husky":"^4.2.5"}}