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

release.yml

59 lines1.7 KB

1name: Release
2​
3on:
4 push:
5 branches: [main, alpha, beta, rc, v4]
6​
7concurrency:
8 group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
9 cancel-in-progress: true
10​
11env:
12 NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
13​
14permissions:
15 contents: write
16 id-token: write
17​
18jobs:
19 release:
20 name: Release
21 if: github.repository_owner == 'TanStack'
22 runs-on: ubuntu-latest
23 steps:
24 - name: Checkout
25 uses: actions/checkout@v5.0.0
26 with:
27 fetch-depth: 0
28 - name: Start Nx Agents
29 run: npx nx-cloud start-ci-run --distribute-on=".nx/workflows/dynamic-changesets.yaml"
30 - name: Setup Tools
31 uses: tanstack/config/.github/setup@main
32 - name: Run Tests
33 run: pnpm run test:ci --parallel=3
34 - name: Stop Nx Agents
35 if: ${{ always() }}
36 run: npx nx-cloud stop-all-agents
37 - name: Version Packages
38 run: pnpm run changeset:version
39 - name: Commit version files
40 run: |
41 if [[ -n "$(git status --porcelain)" ]]; then
42 git config --global user.name 'Tanner Linsley'
43 git config --global user.email 'tannerlinsley@users.noreply.github.com'
44 git add -A
45 git commit -m "ci: Version Packages"
46 git push
47 fi
48 env:
49 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
50 - name: Publish Packages
51 run: pnpm run changeset:publish
52 env:
53 NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
54 - name: Upload coverage to Codecov
55 uses: codecov/codecov-action@v4.6.0
56 with:
57 directory: packages
58 env:
59 CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}