Open History to see the last commit
1name: PR
2
3on:
4 pull_request:
5
6concurrency:
7 group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
8 cancel-in-progress: true
9
10env:
11 NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
12
13permissions:
14 contents: read
15
16jobs:
17 test:
18 name: Test
19 runs-on: ubuntu-latest
20 steps:
21 - name: Checkout
22 uses: actions/checkout@v4.2.2
23 with:
24 fetch-depth: 0
25 - name: Setup Tools
26 uses: tanstack/config/.github/setup@main
27 - name: Get base and head commits for `nx affected`
28 uses: nrwl/nx-set-shas@v4.3.0
29 with:
30 main-branch-name: main
31 - name: Run Checks
32 run: pnpm run lint && pnpm run test && pnpm run build
33 preview:
34 name: Preview
35 runs-on: ubuntu-latest
36 steps:
37 - name: Checkout
38 uses: actions/checkout@v4.2.2
39 with:
40 fetch-depth: 0
41 - name: Setup Tools
42 uses: tanstack/config/.github/setup@main
43 - name: Build Packages
44 run: pnpm run build
45 - name: Publish Previews
46 run: pnpx pkg-pr-new publish --pnpm --compact './packages/*' --template './examples/*/*'