File tree Expand file tree Collapse file tree 4 files changed +104
-2043
lines changed Expand file tree Collapse file tree 4 files changed +104
-2043
lines changed Original file line number Diff line number Diff line change 11name : CI
2- on : [push]
2+ on :
3+ push :
4+ branches :
5+ - master
6+ - beta
7+ - 1.x
8+ pull_request :
9+ paths-ignore :
10+ - ' .gitignore'
11+ - ' .npmignore'
12+ - ' *.md'
13+
314jobs :
415 build :
16+ name : Lint, and test on Node ${{ matrix.node }} and ${{ matrix.os }}
517 runs-on : ubuntu-latest
6- strategy :
7- matrix :
8- node-version : [12.x]
18+
919 steps :
10- - uses : actions/checkout@v2
11- - name : Use Node.js ${{ matrix.node-version }}
20+ - name : Checkout repo
21+ uses : actions/checkout@v2
22+
23+ - name : Use Node ${{ matrix.node }}
1224 uses : actions/setup-node@v1
1325 with :
14- node-version : ${{ matrix.node-version }}
15- - name : Install dependencies
16- run : yarn install --frozen-lockfile
26+ node-version : ${{ matrix.node }}
27+
28+ - name : Install deps and build (with cache)
29+ uses : bahmutov/npm-install@v1
30+
1731 - name : Lint
1832 run : |
19- npm run lint:types
20- npm run lint
33+ yarn lint
34+ yarn lint:types
35+
2136 - name : Test
22- run : npm test
23- env :
24- CI : true
37+ run : yarn test --ci
38+
2539 - name : Build
26- run : npm run build
40+ run : yarn build
41+
42+ publish-module :
43+ name : ' Publish Module to NPM on Node ${{ matrix.node }} and ${{ matrix.os }}'
44+ needs : build
45+ if : github.repository == 'react-hook-form/resolvers' && (github.ref =='refs/heads/master' || github.ref == 'refs/heads/1.x')
46+ runs-on : ubuntu-latest
47+ steps :
48+ - name : Checkout repo
49+ uses : actions/checkout@v2
50+ - name : ' Use Node ${{ matrix.node }}'
51+ uses : actions/setup-node@v1
52+ with :
53+ node-version : ' ${{ matrix.node }}'
54+ registry-url : ' https://registry.npmjs.org/'
55+ - name : Install dependencies
56+ uses : bahmutov/npm-install@v1
57+ - name : Build
58+ run : yarn build
59+ - name : Publish
60+ run : npx semantic-release
61+ env :
62+ NODE_AUTH_TOKEN : ' ${{secrets.NPM_TOKEN}}'
63+ GITHUB_TOKEN : ' ${{secrets.GITHUB_TOKEN}}'
Original file line number Diff line number Diff line change 1- name : size
1+ name : Compressed Size
2+
23on : [pull_request]
4+
35jobs :
4- size :
6+ build :
57 runs-on : ubuntu-latest
6- env :
7- CI_JOB_NUMBER : 1
8+
89 steps :
9- - uses : actions/checkout@v1
10- - uses : andresz1/ size-limit- action@v1
10+ - uses : actions/checkout@v2
11+ - uses : preactjs/compressed- size-action@v2
1112 with :
12- github_token : ${{ secrets.GITHUB_TOKEN }}
13+ repo-token : ' ${{ secrets.GITHUB_TOKEN }}'
Original file line number Diff line number Diff line change 6666 },
6767 "homepage" : " https://react-hook-form.com" ,
6868 "devDependencies" : {
69- "@size-limit/preset-small-lib" : " ^4.9.0" ,
7069 "@testing-library/react" : " ^11.2.2" ,
71- "@testing-library/react-hooks" : " ^3.4.2" ,
7270 "@types/jest" : " ^26.0.15" ,
7371 "@types/react" : " ^17.0.0" ,
7472 "@types/react-dom" : " ^17.0.0" ,
75- "@types/react-test-renderer" : " ^17.0.0" ,
7673 "@typescript-eslint/eslint-plugin" : " ^4.8.1" ,
7774 "@typescript-eslint/parser" : " ^4.8.1" ,
7875 "eslint" : " ^7.14.0" ,
8885 "react" : " ^17.0.1" ,
8986 "react-dom" : " ^17.0.1" ,
9087 "react-hook-form" : " ^6.11.4" ,
91- "react-test-renderer" : " ^17.0.1" ,
9288 "rimraf" : " ^3.0.2" ,
93- "size-limit" : " ^4.9.0" ,
9489 "ts-jest" : " ^26.4.4" ,
9590 "typescript" : " ^4.1.2"
9691 },
You can’t perform that action at this time.
0 commit comments