File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2121 run : bun install --frozen-lockfile
2222
2323 - name : Type check
24- run : bunx tsc --noEmit
24+ run : bun run typecheck
2525
2626 - name : Test with Coverage
2727 run : |
Original file line number Diff line number Diff line change 1+ name : Publish to npm
2+
3+ on :
4+ push :
5+ tags :
6+ - ' v*'
7+
8+ permissions :
9+ contents : read
10+ packages : write
11+
12+ jobs :
13+ publish :
14+ runs-on : ubuntu-latest
15+ steps :
16+ - uses : actions/checkout@v4
17+
18+ - uses : actions/setup-node@v4
19+ with :
20+ node-version : ' 20.x'
21+ registry-url : ' https://registry.npmjs.org'
22+
23+ - name : Setup Bun
24+ uses : oven-sh/setup-bun@v2
25+ with :
26+ bun-version : latest
27+
28+ - name : Install dependencies
29+ run : bun install --frozen-lockfile
30+
31+ - name : Build
32+ run : bun run build:vite
33+
34+ - name : Type check
35+ run : bun run typecheck
36+
37+ - name : Run tests
38+ run : bun test
39+
40+ - name : Publish to npm
41+ run : |
42+ VERSION="${GITHUB_REF_NAME#v}"
43+ TAG="latest"
44+ if [[ "$VERSION" == *"beta"* ]]; then
45+ TAG="beta"
46+ elif [[ "$VERSION" == *"alpha"* ]]; then
47+ TAG="alpha"
48+ elif [[ "$VERSION" == *"rc"* ]]; then
49+ TAG="rc"
50+ fi
51+ npm publish --tag "$TAG" --access public
52+ env :
53+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
You can’t perform that action at this time.
0 commit comments