Open History to see the last commit
1name: ci
2β
3on:
4 workflow_dispatch:
5 inputs:
6 tag:
7 description: override release tag
8 required: false
9 push:
10 branches: ['main', 'alpha', 'beta', 'rc', 'v4']
11β
12concurrency:
13 group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
14 cancel-in-progress: true
15β
16env:
17 NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
18β
19jobs:
20 test-and-publish:
21 name: Test & Publish
22 if: github.repository == 'TanStack/query'
23 runs-on: ubuntu-latest
24 steps:
25 - name: Checkout
26 uses: actions/checkout@v4
27 with:
28 fetch-depth: '0'
29 - name: Setup pnpm
30 uses: pnpm/action-setup@v2
31 with:
32 version: 8
33 - name: Setup Node
34 uses: actions/setup-node@v4
35 with:
36 node-version-file: .nvmrc
37 cache: pnpm
38 - name: Install dependencies
39 run: pnpm install --frozen-lockfile --prefer-offline
40 - name: Run Tests
41 run: pnpm run test:ci
42 - name: Publish
43 run: |
44 git config --global user.name 'Tanner Linsley'
45 git config --global user.email 'tannerlinsley@users.noreply.github.com'
46 npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
47 pnpm run cipublish
48 env:
49 GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
50 GH_TOKEN: ${{ secrets.GH_TOKEN }}
51 NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
52 NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
53 TAG: ${{ inputs.tag }}
54 - name: Upload coverage to Codecov
55 uses: codecov/codecov-action@v3
56 with:
57 directory: packages