File tree Expand file tree Collapse file tree 3 files changed +78
-1
lines changed Expand file tree Collapse file tree 3 files changed +78
-1
lines changed Original file line number Diff line number Diff line change 1+ name : ci
2+
3+ on :
4+ workflow_dispatch :
5+ inputs :
6+ tag :
7+ description : override release tag
8+ required : false
9+ push :
10+ branches : [main, alpha, beta]
11+
12+ concurrency :
13+ group : ${{ github.workflow }}-${{ github.event.number || github.ref }}
14+ cancel-in-progress : true
15+
16+ permissions :
17+ contents : write
18+ id-token : write
19+
20+ jobs :
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 : Publish
35+ run : |
36+ git config --global user.name 'Tanner Linsley'
37+ git config --global user.email 'tannerlinsley@users.noreply.github.com'
38+ npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
39+ pnpm run cipublish
40+ env :
41+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
42+ NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
43+ TAG : ${{ inputs.tag }}
Original file line number Diff line number Diff line change 77 "scripts" : {
88 "build" : " tsc" ,
99 "start" : " tsc && node dist/index.js" ,
10- "test" : " echo \" Error: no test specified\" && exit 1" ,
10+ "test" : " echo \" Error: no test specified\" && exit 0" ,
11+ "cipublish" : " node scripts/publish.js" ,
1112 "test:lint" : " eslint ./src"
1213 },
1314 "keywords" : [
Original file line number Diff line number Diff line change 1+ // @ts -check
2+
3+ import { resolve } from 'node:path'
4+ import { fileURLToPath } from 'node:url'
5+ import { publish } from '@tanstack/config/publish'
6+
7+ const __dirname = fileURLToPath ( new URL ( '.' , import . meta. url ) )
8+
9+ await publish ( {
10+ packages : [
11+ {
12+ name : 'create-tanstack-app' ,
13+ packageDir : '.' ,
14+ } ,
15+ ] ,
16+ branchConfigs : {
17+ main : {
18+ prerelease : false ,
19+ } ,
20+ alpha : {
21+ prerelease : true ,
22+ } ,
23+ beta : {
24+ prerelease : true ,
25+ } ,
26+ } ,
27+ rootDir : resolve ( __dirname , '..' ) ,
28+ branch : process . env . BRANCH ,
29+ tag : process . env . TAG ,
30+ ghToken : process . env . GH_TOKEN ,
31+ } )
32+
33+ process . exit ( 0 )
You can’t perform that action at this time.
0 commit comments