Skip to content

Commit c74a370

Browse files
authored
Merge pull request #311 from aquariuslt/master
ci: add github workflows for test/build/publish
2 parents f3c9d6d + 56fecbd commit c74a370

6 files changed

Lines changed: 87 additions & 3 deletions

File tree

.github/workflows/ci.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: build
2+
3+
on: [push]
4+
jobs:
5+
build:
6+
runs-on: ubuntu-latest
7+
8+
strategy:
9+
matrix:
10+
node-version: [10.x, 12.x]
11+
12+
steps:
13+
- name: SCM
14+
uses: actions/checkout@v1
15+
- name: Use Node.js ${{ matrix.node-version }}
16+
uses: actions/setup-node@v1
17+
with:
18+
node-version: ${{ matrix.node-version }}
19+
- name: NODE CI
20+
run: |
21+
npm install
22+
npm test

.github/workflows/publish.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: publish
2+
3+
on:
4+
release:
5+
branches:
6+
- master
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: SCM
13+
uses: actions/checkout@v1
14+
- name: Setup Node Environment
15+
uses: actions/setup-node@v1
16+
with:
17+
node-version: 10
18+
- name: Node CI
19+
run: |
20+
npm install
21+
npm test
22+
23+
publish-npm:
24+
needs: build
25+
runs-on: ubuntu-latest
26+
steps:
27+
- name: SCM
28+
uses: actions/checkout@v1
29+
- name: Setup Node Environment
30+
uses: actions/setup-node@v1
31+
with:
32+
node-version: 10
33+
registry-url: https://registry.npmjs.org/
34+
- name: Yarn install & Build
35+
run: |
36+
npm install
37+
npm run build
38+
- name: Publish to NPM Registry
39+
run: npm publish
40+
if: github.event.action == 'created'
41+
env:
42+
NODE_AUTH_TOKEN: ${{secrets.NODE_AUTH_TOKEN}}

.travis.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
language: node_js
22
node_js:
3-
- "8"
43
- "10"
4+
- "12"
55
env:
66
- REACT=16.x
77
script:
88
- npm test
99
- npm run coverage
1010
before_install:
1111
- npm install
12-
- npm install react react-dom
1312
after_script:
1413
npm install coveralls && nyc report --reporter=text-lcov | coveralls

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# React-WeUI [![Build Status](https://travis-ci.org/weui/react-weui.svg?branch=master)](https://travis-ci.org/weui/react-weui) [![npm version](https://img.shields.io/npm/v/react-weui.svg)](https://www.npmjs.org/package/react-weui)
1+
# React-WeUI [![Build Status](https://travis-ci.org/weui/react-weui.svg?branch=master)](https://travis-ci.org/weui/react-weui) [![Github Workflow Status](https://github.com/weui/react-weui/workflows/ci/badge.svg)](https://github.com/weui/react-weui) [![npm version](https://img.shields.io/npm/v/react-weui.svg)](https://www.npmjs.org/package/react-weui)
22

33
[WeUI](https://github.com/weui/weui) Components build with [React](http://facebook.github.io/react/).
44

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,10 @@
8383
"open-browser-webpack-plugin": "0.0.1",
8484
"postcss-loader": "^2.0.6",
8585
"raw-loader": "^0.5.1",
86+
"react": "^16.9.0",
8687
"react-codemirror": "^0.2.6",
8788
"react-docgen": "^3.0.0",
89+
"react-dom": "^16.9.0",
8890
"react-fontawesome": "^1.3.1",
8991
"react-remarkable": "^1.1.1",
9092
"react-router": "^4.1.1",

yarn.lock

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6559,6 +6559,16 @@ react-docgen@^3.0.0:
65596559
node-dir "^0.1.10"
65606560
recast "^0.16.0"
65616561

6562+
react-dom@^16.9.0:
6563+
version "16.9.0"
6564+
resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.9.0.tgz#5e65527a5e26f22ae3701131bcccaee9fb0d3962"
6565+
integrity sha512-YFT2rxO9hM70ewk9jq0y6sQk8cL02xm4+IzYBz75CQGlClQQ1Bxq0nhHF6OtSbit+AIahujJgb/CPRibFkMNJQ==
6566+
dependencies:
6567+
loose-envify "^1.1.0"
6568+
object-assign "^4.1.1"
6569+
prop-types "^15.6.2"
6570+
scheduler "^0.15.0"
6571+
65626572
react-fontawesome@^1.3.1:
65636573
version "1.6.1"
65646574
resolved "https://registry.npmjs.org/react-fontawesome/-/react-fontawesome-1.6.1.tgz#eddce17e7dc731aa09fd4a186688a61793a16c5c"
@@ -6649,6 +6659,15 @@ react-transition-group@^2.0.2:
66496659
prop-types "^15.6.2"
66506660
react-lifecycles-compat "^3.0.4"
66516661

6662+
react@^16.9.0:
6663+
version "16.9.0"
6664+
resolved "https://registry.yarnpkg.com/react/-/react-16.9.0.tgz#40ba2f9af13bc1a38d75dbf2f4359a5185c4f7aa"
6665+
integrity sha512-+7LQnFBwkiw+BobzOF6N//BdoNw0ouwmSJTEm9cglOOmsg/TMiFHZLe2sEoN5M7LgJTj9oHH0gxklfnQe66S1w==
6666+
dependencies:
6667+
loose-envify "^1.1.0"
6668+
object-assign "^4.1.1"
6669+
prop-types "^15.6.2"
6670+
66526671
read-pkg-up@^1.0.1:
66536672
version "1.0.1"
66546673
resolved "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02"

0 commit comments

Comments
 (0)