From fd8e62fba30ede0cabc47761535df1fbd6c2d4f8 Mon Sep 17 00:00:00 2001 From: YeonGyu-Kim Date: Wed, 24 Dec 2025 01:44:24 +0900 Subject: [PATCH] fix(publish): include CLI build step to ensure dist/cli/index.js is packaged in npm release MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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) --- .github/workflows/publish.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 9a3da58..fa7d9fd 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -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