Skip to content
Source
Sign inSign up
TanStack/query
Open History to see the last commit

ci.yml

40 lines1.2 KB

1name: ci
2concurrency:
3 group: publish-${{ github.github.base_ref }}
4 cancel-in-progress: true
5on:
6 workflow_dispatch:
7 inputs:
8 tag:
9 description: override release tag
10 required: false
11 push:
12jobs:
13 test-and-publish:
14 if: github.repository == 'TanStack/query' && github.event_name != 'pull_request'
15 name: 'Test & Publish'
16 runs-on: ubuntu-latest
17 steps:
18 - uses: actions/checkout@v3
19 with:
20 fetch-depth: '0'
21 - uses: pnpm/action-setup@v2.2.2
22 with:
23 version: 7
24 - uses: actions/setup-node@v3
25 with:
26 node-version: 16.14.2
27 registry-url: https://registry.npmjs.org/
28 cache: 'pnpm'
29 - run: |
30 pnpm --filter "./packages/**" --filter query --prefer-offline install
31 git config --global user.name 'Tanner Linsley'
32 git config --global user.email 'tannerlinsley@users.noreply.github.com'
33 npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
34 pnpm run cipublish
35 env:
36 GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
37 GH_TOKEN: ${{ secrets.GH_TOKEN }}
38 NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
39 NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
40 TAG: ${{ inputs.tag }}