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

ci.yml

52 lines1.4 KB

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]
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 SERVER_PRESET: 'node-server'
19​
20permissions:
21 contents: write
22 id-token: write
23​
24jobs:
25 test:
26 name: Build & Test
27 if: github.repository_owner == 'TanStack'
28 runs-on: ubuntu-latest
29 steps:
30 - name: Checkout
31 uses: actions/checkout@v4.2.2
32 with:
33 fetch-depth: 0
34 - name: Start Nx Agents
35 run: npx nx-cloud start-ci-run --distribute-on=".nx/workflows/dynamic-changesets.yaml"
36 - name: Setup Tools
37 uses: tanstack/config/.github/setup@main
38 - name: Run Tests
39 run: pnpm run test:ci --parallel=3
40 - name: Stop Nx Agents
41 if: ${{ always() }}
42 run: npx nx-cloud stop-all-agents
43 - name: Publish
44 run: |
45 git config --global user.name 'Tanner Linsley'
46 git config --global user.email 'tannerlinsley@users.noreply.github.com'
47 npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
48 pnpm run cipublish
49 env:
50 GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
51 NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
52 TAG: ${{ inputs.tag }}