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)
This commit is contained in:
11
.github/workflows/publish.yml
vendored
11
.github/workflows/publish.yml
vendored
@@ -103,9 +103,10 @@ jobs:
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
echo "=== Running bun build ==="
|
||||
bun build src/index.ts --outdir dist --target bun --format esm --external @ast-grep/napi
|
||||
echo "=== bun build exit code: $? ==="
|
||||
echo "=== Running bun build (main) ==="
|
||||
bun build src/index.ts src/google-auth.ts --outdir dist --target bun --format esm --external @ast-grep/napi
|
||||
echo "=== Running bun build (CLI) ==="
|
||||
bun build src/cli/index.ts --outdir dist/cli --target bun --format esm
|
||||
echo "=== Running tsc ==="
|
||||
tsc --emitDeclarationOnly
|
||||
echo "=== Running build:schema ==="
|
||||
@@ -113,8 +114,12 @@ jobs:
|
||||
|
||||
- name: Verify build output
|
||||
run: |
|
||||
echo "=== dist/ contents ==="
|
||||
ls -la dist/
|
||||
echo "=== dist/cli/ contents ==="
|
||||
ls -la dist/cli/
|
||||
test -f dist/index.js || (echo "ERROR: dist/index.js not found!" && exit 1)
|
||||
test -f dist/cli/index.js || (echo "ERROR: dist/cli/index.js not found!" && exit 1)
|
||||
|
||||
- name: Publish
|
||||
run: bun run script/publish.ts
|
||||
|
||||
Reference in New Issue
Block a user