Open History to see the last commit
1name: react-query tests
2β
3on:
4 push:
5 branches:
6 - 'master'
7 - 'next'
8 - 'beta'
9 - '1.x'
10 - '2.x'
11 pull_request:
12β
13jobs:
14 test:
15 name: 'Node ${{ matrix.node }}'
16 runs-on: ubuntu-latest
17 strategy:
18 matrix:
19 node: [12, 14, 16]
20 steps:
21 - uses: actions/checkout@v2
22 - uses: actions/setup-node@v2
23 with:
24 node-version: ${{ matrix.node }}
25 - name: Install dependencies
26 uses: bahmutov/npm-install@v1
27 - run: yarn test:ci
28 - run: yarn test:size
29 if: matrix.node == '16'
30 env:
31 BUNDLEWATCH_GITHUB_TOKEN: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}
32β
33 publish-module:
34 name: 'Publish Module to NPM'
35 needs: test
36 # publish only when merged in master on original repo, not on PR
37 if: github.repository == 'tannerlinsley/react-query' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/next' || github.ref == 'refs/heads/beta' || github.ref == 'refs/heads/1.x' || github.ref == 'refs/heads/2.x')
38 runs-on: ubuntu-latest
39 steps:
40 - uses: actions/checkout@v2
41 - uses: actions/setup-node@v2
42 with:
43 node-version: 14
44 registry-url: https://registry.npmjs.org/
45 - name: Install dependencies
46 uses: bahmutov/npm-install@v1
47 - run: yarn build
48 - run: npx semantic-release@17
49 env:
50 NODE_AUTH_TOKEN: ${{secrets.npm_token}}
51 GH_TOKEN: ${{secrets.GH_TOKEN}}