build: wire ast-grep MCP into release gates

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
YeonGyu-Kim
2026-05-18 21:20:05 +09:00
parent 05c09c1d32
commit 06f6709317
6 changed files with 17 additions and 17 deletions
+3 -3
View File
@@ -55,7 +55,7 @@ jobs:
- name: Install dependencies
run: bun install --frozen-lockfile
env:
BUN_INSTALL_ALLOW_SCRIPTS: "@ast-grep/napi"
BUN_INSTALL_ALLOW_SCRIPTS: "@ast-grep/cli @ast-grep/napi"
- name: Run tests
run: bun test
@@ -83,7 +83,7 @@ jobs:
- name: Install dependencies
run: bun install --frozen-lockfile
env:
BUN_INSTALL_ALLOW_SCRIPTS: "@ast-grep/napi"
BUN_INSTALL_ALLOW_SCRIPTS: "@ast-grep/cli @ast-grep/napi"
- name: Type check
run: bun run typecheck
@@ -118,7 +118,7 @@ jobs:
- name: Install dependencies
run: bun install --frozen-lockfile
env:
BUN_INSTALL_ALLOW_SCRIPTS: "@ast-grep/napi"
BUN_INSTALL_ALLOW_SCRIPTS: "@ast-grep/cli @ast-grep/napi"
- name: Build
run: bun run build
+2 -1
View File
@@ -54,7 +54,7 @@ jobs:
- name: Install dependencies
run: bun install --frozen-lockfile
env:
BUN_INSTALL_ALLOW_SCRIPTS: "@ast-grep/napi"
BUN_INSTALL_ALLOW_SCRIPTS: "@ast-grep/cli @ast-grep/napi"
- name: Validate release inputs
id: validate
@@ -187,6 +187,7 @@ jobs:
retry_wait_seconds: 10
shell: bash
command: |
bun run build:ast-grep-mcp
PLATFORM="${{ matrix.platform }}"
PACKAGE_DIR="packages/oh-my-opencode-${PLATFORM}"
case "$PLATFORM" in
+5 -9
View File
@@ -43,7 +43,7 @@ jobs:
- name: Install dependencies
run: bun install --frozen-lockfile
env:
BUN_INSTALL_ALLOW_SCRIPTS: "@ast-grep/napi"
BUN_INSTALL_ALLOW_SCRIPTS: "@ast-grep/cli @ast-grep/napi"
- name: Run tests
run: bun test
@@ -60,7 +60,7 @@ jobs:
- name: Install dependencies
run: bun install --frozen-lockfile
env:
BUN_INSTALL_ALLOW_SCRIPTS: "@ast-grep/napi"
BUN_INSTALL_ALLOW_SCRIPTS: "@ast-grep/cli @ast-grep/napi"
- name: Type check
run: bun run typecheck
@@ -162,7 +162,7 @@ jobs:
- name: Install dependencies
run: bun install --frozen-lockfile
env:
BUN_INSTALL_ALLOW_SCRIPTS: "@ast-grep/napi"
BUN_INSTALL_ALLOW_SCRIPTS: "@ast-grep/cli @ast-grep/napi"
- name: Calculate version
id: version
@@ -232,11 +232,7 @@ jobs:
- name: Build main package
if: steps.check.outputs.skip != 'true'
run: |
bun build src/index.ts --outdir dist --target bun --format esm --external @ast-grep/napi
bun build src/cli/index.ts --outdir dist/cli --target bun --format esm --external @ast-grep/napi
bunx tsc --emitDeclarationOnly
bun run build:schema
run: bun run build
- name: Strip token auth from .npmrc to force OIDC
if: steps.check.outputs.skip != 'true'
@@ -330,7 +326,7 @@ jobs:
- name: Install dependencies
run: bun install --frozen-lockfile
env:
BUN_INSTALL_ALLOW_SCRIPTS: "@ast-grep/napi"
BUN_INSTALL_ALLOW_SCRIPTS: "@ast-grep/cli @ast-grep/napi"
- name: Generate changelog
run: |
@@ -23,7 +23,7 @@ jobs:
- name: Install dependencies
run: bun install --frozen-lockfile
env:
BUN_INSTALL_ALLOW_SCRIPTS: "@ast-grep/napi"
BUN_INSTALL_ALLOW_SCRIPTS: "@ast-grep/cli @ast-grep/napi"
- name: Refresh bundled model capabilities snapshot
run: bun run build:model-capabilities
+4 -3
View File
@@ -28,7 +28,7 @@
"./schema.json": "./dist/oh-my-opencode.schema.json"
},
"scripts": {
"build": "bun build src/index.ts --outdir dist --target bun --format esm --external @ast-grep/napi --external zod && bun run build:node-require-shim && tsc --emitDeclarationOnly && bun build src/cli/index.ts --outdir dist/cli --target bun --format esm --external @ast-grep/napi && bun run build:schema",
"build": "bun run build:ast-grep-mcp && bun build src/index.ts --outdir dist --target bun --format esm --external @ast-grep/napi --external zod && bun run build:node-require-shim && tsc --emitDeclarationOnly && bun build src/cli/index.ts --outdir dist/cli --target bun --format esm --external @ast-grep/napi && bun run build:schema",
"build:lsp-tools-mcp": "npm --prefix packages/lsp-tools-mcp ci && npm --prefix packages/lsp-tools-mcp run build",
"build:node-require-shim": "bun run script/patch-node-require-shim.ts",
"build:all": "bun run build && bun run build:binaries",
@@ -38,9 +38,10 @@
"clean": "rm -rf dist",
"prepare": "bun run build",
"postinstall": "node postinstall.mjs",
"prepublishOnly": "bun run clean && bun run build:lsp-tools-mcp && bun run build:ast-grep-mcp && bun run build",
"prepublishOnly": "bun run clean && bun run build:lsp-tools-mcp && bun run build",
"test:model-capabilities": "bun test src/shared/model-capability-aliases.test.ts src/shared/model-capability-guardrails.test.ts src/shared/model-capabilities.test.ts src/cli/doctor/checks/model-resolution.test.ts --bail",
"typecheck": "tsgo --noEmit",
"typecheck": "tsgo --noEmit && bun run typecheck:packages",
"typecheck:packages": "tsgo --noEmit -p packages/rules-core/tsconfig.json && tsgo --noEmit -p packages/ast-grep-mcp/tsconfig.json",
"typecheck:script": "tsgo --noEmit -p script/tsconfig.json",
"test": "bun test",
"build:ast-grep-mcp": "bun run --cwd packages/ast-grep-mcp build"
+2
View File
@@ -67,6 +67,8 @@ async function main() {
console.log(` Entry point: ${ENTRY_POINT}`);
console.log(` Platforms: ${PLATFORMS.length}`);
await $`bun run build:ast-grep-mcp`;
// Verify entry point exists
if (!existsSync(ENTRY_POINT)) {
console.error(`\n❌ Entry point not found: ${ENTRY_POINT}`);