Skip to content

Commit fd8e62f

Browse files
committed
fix(publish): include CLI build step to ensure dist/cli/index.js is packaged in npm release
The CLI module was missing from the npm package because the publish workflow did not include the 'bun build src/cli/index.ts' step. This caused 'bunx oh-my-opencode install' to fail with missing dist/cli/index.js at runtime. Added explicit CLI build and verification step to prevent this regression. 🤖 Generated with assistance of [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
1 parent f5c7f43 commit fd8e62f

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

.github/workflows/publish.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,18 +103,23 @@ jobs:
103103
104104
- name: Build
105105
run: |
106-
echo "=== Running bun build ==="
107-
bun build src/index.ts --outdir dist --target bun --format esm --external @ast-grep/napi
108-
echo "=== bun build exit code: $? ==="
106+
echo "=== Running bun build (main) ==="
107+
bun build src/index.ts src/google-auth.ts --outdir dist --target bun --format esm --external @ast-grep/napi
108+
echo "=== Running bun build (CLI) ==="
109+
bun build src/cli/index.ts --outdir dist/cli --target bun --format esm
109110
echo "=== Running tsc ==="
110111
tsc --emitDeclarationOnly
111112
echo "=== Running build:schema ==="
112113
bun run build:schema
113114
114115
- name: Verify build output
115116
run: |
117+
echo "=== dist/ contents ==="
116118
ls -la dist/
119+
echo "=== dist/cli/ contents ==="
120+
ls -la dist/cli/
117121
test -f dist/index.js || (echo "ERROR: dist/index.js not found!" && exit 1)
122+
test -f dist/cli/index.js || (echo "ERROR: dist/cli/index.js not found!" && exit 1)
118123
119124
- name: Publish
120125
run: bun run script/publish.ts

0 commit comments

Comments
 (0)