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

ci.yml

50 lines1.5 KB

1name: ci
2concurrency:
3 group: publish-${{ github.github.base_ref }}
4 cancel-in-progress: true
5on:
6 workflow_dispatch:
7 inputs:
8 tag:
9 description: override release tag
10 required: false
11 push:
12 branches:
13 - 'main'
14 - 'alpha'
15 - 'beta'
16env:
17 NX_DAEMON: false
18 NX_VERBOSE_LOGGING: true
19 NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
20jobs:
21 test-and-publish:
22 if: github.repository == 'TanStack/form' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/alpha' || github.ref == 'refs/heads/beta')
23 name: 'Test & Publish'
24 runs-on: ubuntu-latest
25 steps:
26 - uses: actions/checkout@v3
27 with:
28 fetch-depth: '0'
29 - uses: pnpm/action-setup@v2.2.4
30 with:
31 version: 8
32 - uses: actions/setup-node@v3
33 with:
34 node-version: 18.15.0
35 registry-url: https://registry.npmjs.org/
36 cache: 'pnpm'
37 - name: Install dependencies
38 run: pnpm install --no-frozen-lockfile
39 - name: Publish
40 run: |
41 git config --global user.name 'Tanner Linsley'
42 git config --global user.email 'tannerlinsley@users.noreply.github.com'
43 npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
44 pnpm run cipublish
45 env:
46 GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
47 GH_TOKEN: ${{ secrets.GH_TOKEN }}
48 NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
49 NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
50 TAG: ${{ inputs.tag }}