diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml new file mode 100644 index 0000000..ec870e7 --- /dev/null +++ b/.github/workflows/npm-publish.yml @@ -0,0 +1,22 @@ +name: Node.js Package + +on: + release: + types: [created] + +jobs: + publish-npm: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v1 + with: + node-version: 12 + registry-url: https://registry.npmjs.org/ + - run: yarn + - run: yarn build + - run: yarn test + - run: npm run publish + env: + NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}} + CI: true diff --git a/README.md b/README.md index a70585b..fc9f4ae 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ [![Travis](https://img.shields.io/travis/unadlib/usm.svg)](https://travis-ci.org/unadlib/usm) [![npm](https://img.shields.io/npm/v/usm.svg)](https://www.npmjs.com/package/usm) -USM is a universal state modular library, supports Redux(v4.x), MobX(v6.x), Vuex(v4.x) and Angular(v2.0+). +USM is a universal state modular library, supports Redux(4.x), MobX(6.x), Vuex(4.x) and Angular(2.0+). ## Support diff --git a/package.json b/package.json index 8f5e354..cd78734 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,9 @@ "test": "yarn test:dev", "check:type": "tsc --noEmit", "build": "cross-env NODE_ENV=production ts-node scripts/build.ts", - "clean": "lerna exec rimraf ./dist ./build" + "clean": "lerna exec rimraf ./dist ./build", + "update:version": "lerna version --amend --no-git-tag-version", + "publish": "lerna exec --no-private --no-bail -- npm publish" }, "repository": { "type": "git",