Skip to content

Commit 40c6e58

Browse files
committed
fix(ci): build workspaces before typecheck in publish workflow
The CLI's typecheck resolves @ibm/ibmi-mcp-server/{tools,services,context, formatting} through the server's exports map, which points at ./dist/public/*.js. On a fresh CI runner, those files do not exist until npm run build executes. Running typecheck before build causes TS2307 module-resolution errors and fails the publish workflow (observed on v0.5.0 publish run). Move the Build step above Run tests and checks so the server's dist/ is present when typecheck runs. The root build script already orders server before CLI. Signed-off-by: Adam Shedivy <ajshedivyaj@gmail.com>
1 parent ff0b564 commit 40c6e58

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

.github/workflows/publish.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,20 @@ jobs:
2929
rm -rf node_modules packages/*/node_modules
3030
npm install --prefer-offline
3131
32+
# Build @ibm/ibmi-mcp-server first so the CLI's typecheck can resolve
33+
# @ibm/ibmi-mcp-server/{tools,services,context,formatting} subpath exports,
34+
# which are defined in the server's package.json `exports` map pointing at
35+
# ./dist/public/*.js. Running typecheck before build causes TS2307 errors
36+
# on a fresh runner. The root `build` script builds server then CLI.
37+
- name: Build
38+
run: npm run build
39+
3240
- name: Run tests and checks
3341
run: |
3442
npm run typecheck --workspaces --if-present
3543
npm run lint --workspaces --if-present
3644
npm run test --workspaces --if-present
3745
38-
# Build @ibm/ibmi-mcp-server first (the CLI imports from its dist/public).
39-
- name: Build
40-
run: npm run build
41-
4246
- name: Publish @ibm/ibmi-mcp-server to npm
4347
working-directory: ./packages/server
4448
run: npm publish --access public --provenance

0 commit comments

Comments
 (0)