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

ci.yml

45 lines1.1 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​
16permissions:
17 contents: write
18 id-token: write
19​
20jobs:
21 test-and-publish:
22 name: Test & Publish
23 if: github.repository_owner == 'TanStack'
24 runs-on: ubuntu-latest
25 steps:
26 - name: Checkout
27 uses: actions/checkout@v4.2.2
28 with:
29 fetch-depth: 0
30 - name: Setup Tools
31 uses: tanstack/config/.github/setup@main
32 - name: Build
33 run: pnpm build
34 - name: Test
35 run: pnpm test
36 - name: Publish
37 run: |
38 git config --global user.name 'Tanner Linsley'
39 git config --global user.email 'tannerlinsley@users.noreply.github.com'
40 npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
41 pnpm run cipublish
42 env:
43 GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
44 NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
45 TAG: ${{ inputs.tag }}