Skip to content

Commit b942d86

Browse files
chapterjasonclaude
andcommitted
Add CI/release workflows and flatten package topology
Bundle the server with vite (single-file output, node-pty external) and drop the npm workspaces layout in favor of one root package.json so the release tarball is a flat runnable package — no workspace sub-packages, no dev-dep bloat on install. A global install now gives consumers a working web-shell bin. CI runs typecheck + build on push/PR; release packs a tarball and attaches it to a GitHub Release on v* tags. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent f720c7b commit b942d86

9 files changed

Lines changed: 1600 additions & 145 deletions

File tree

.github/workflows/ci.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
branches: [master]
8+
workflow_dispatch:
9+
10+
permissions:
11+
contents: read
12+
13+
jobs:
14+
build:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v6
18+
19+
- uses: actions/setup-node@v6
20+
with:
21+
node-version-file: .nvmrc
22+
cache: npm
23+
24+
- run: npm ci --ignore-scripts
25+
26+
- run: npm run typecheck
27+
28+
- run: npm run build
29+
30+
- name: Verify dist artifacts
31+
run: |
32+
test -f server/dist/index.js
33+
test -f client/dist/index.html
34+
35+
- name: Smoke test npm pack
36+
run: npm pack --dry-run
37+
38+
- uses: actions/upload-artifact@v7
39+
with:
40+
name: dist
41+
path: |
42+
server/dist
43+
client/dist
44+
retention-days: 7

.github/workflows/release.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
workflow_dispatch:
8+
inputs:
9+
ref:
10+
description: "Git ref (tag or commit SHA) to build from"
11+
required: true
12+
default: "master"
13+
14+
permissions:
15+
contents: write
16+
17+
jobs:
18+
publish:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v6
22+
with:
23+
ref: ${{ github.event.inputs.ref || github.ref }}
24+
25+
- uses: actions/setup-node@v6
26+
with:
27+
node-version-file: .nvmrc
28+
cache: npm
29+
30+
- run: npm ci --ignore-scripts
31+
32+
- run: npm run build
33+
34+
- name: Pack npm tarball
35+
id: pack
36+
run: |
37+
file=$(npm pack --ignore-scripts --silent)
38+
echo "file=$file" >> "$GITHUB_OUTPUT"
39+
40+
- name: Create GitHub Release with tarball
41+
if: startsWith(github.ref, 'refs/tags/')
42+
env:
43+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
44+
run: gh release create "$GITHUB_REF_NAME" "${{ steps.pack.outputs.file }}" --notes ""

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
24.15.0

client/package.json

Lines changed: 0 additions & 29 deletions
This file was deleted.

client/vite.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ export default defineConfig(() => {
2727
const pathname = parsed?.pathname ?? "/";
2828
const base = !parsed || pathname === "/" ? "/" : `${pathname.replace(/\/$/, "")}/`;
2929
return {
30+
root: import.meta.dirname,
3031
base,
3132
plugins: [reinstateBase(base)],
3233
server: {

0 commit comments

Comments
 (0)