Open History to see the last commit
1name: Release
2β
3on:
4 push:
5 branches: [main, alpha, beta, rc]
6β
7concurrency:
8 group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
9 # Never cancel an in-flight release β a mid-publish cancellation can leave
10 # partial versions on npm with no rollback.
11 cancel-in-progress: false
12β
13env:
14 NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
15β
16permissions:
17 contents: read
18β
19jobs:
20 release:
21 name: Release
22 if: github.repository_owner == 'TanStack'
23 runs-on: ubuntu-latest
24 permissions:
25 contents: write
26 id-token: write
27 pull-requests: write
28 # Configure required reviewers / wait timer for this environment in
29 # repo settings β Environments β release. Until configured, this only
30 # creates a deployment record (no gating).
31 environment: release
32 steps:
33 - name: Checkout
34 uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
35 with:
36 fetch-depth: 0
37 persist-credentials: false
38 - name: Setup Tools
39 uses: TanStack/config/.github/setup@190f659075ff0845850e330883eb26d7ffd0671f # main
40 - name: Run Tests
41 run: pnpm run test:ci
42 - name: Run Changesets (version or publish)
43 id: changesets
44 uses: changesets/action@6a0a831ff30acef54f2c6aa1cbbc1096b066edaf # v1.7.0
45 with:
46 version: pnpm run changeset:version
47 publish: pnpm run changeset:publish
48 commit: 'ci: Version Packages'
49 title: 'ci: Version Packages'
50 - name: Comment on PRs about release
51 if: steps.changesets.outputs.published == 'true'
52 uses: TanStack/config/.github/comment-on-release@190f659075ff0845850e330883eb26d7ffd0671f # main
53 with:
54 published-packages: ${{ steps.changesets.outputs.publishedPackages }}