chore: update dev workflow — fix publish script, remove deploy.sh, update CLAUDE.md

- scripts/publish-all.mjs: update to 6 active packages only
- scripts/deploy.sh: removed (dashboard/gateway in legacy)
- package.json: release script uses publish-all.mjs directly
- CLAUDE.md: add complete dev workflow section (setup, build, check, test, publish)

小橘 🍊(NEKO Team)
This commit is contained in:
2026-05-19 08:07:45 +00:00
parent 4e89508246
commit 46def2945a
4 changed files with 34 additions and 69 deletions
-44
View File
@@ -1,44 +0,0 @@
#!/usr/bin/env bash
# deploy.sh — Build & deploy dashboard + gateway to Cloudflare
#
# Usage:
# ./scripts/deploy.sh # deploy both
# ./scripts/deploy.sh dashboard # dashboard only
# ./scripts/deploy.sh gateway # gateway only
#
# Env (via `cfg` or export):
# CLOUDFLARE_API_TOKEN — Cloudflare API token
set -euo pipefail
REPO_ROOT="$(cd "$(dirname "$0")/.." && pwd)"
cd "$REPO_ROOT"
CLOUDFLARE_API_TOKEN="${CLOUDFLARE_API_TOKEN:?CLOUDFLARE_API_TOKEN is required}"
export CLOUDFLARE_API_TOKEN
TARGET="${1:-all}"
deploy_dashboard() {
echo "🌐 Building dashboard..."
(cd packages/workflow-dashboard && npm run build)
echo "🚀 Deploying dashboard to Cloudflare Pages..."
(cd packages/workflow-gateway && npx wrangler pages deploy \
../workflow-dashboard/dist \
--project-name workflow-dashboard)
echo " ✅ Dashboard → workflow.shazhou.work"
}
deploy_gateway() {
echo "🚀 Deploying gateway Worker..."
(cd packages/workflow-gateway && npx wrangler deploy)
echo " ✅ Gateway → workflow-gateway.shazhou.workers.dev"
}
case "$TARGET" in
dashboard) deploy_dashboard ;;
gateway) deploy_gateway ;;
all) deploy_dashboard; deploy_gateway ;;
*) echo "Usage: deploy.sh [dashboard|gateway|all]"; exit 1 ;;
esac
echo "✅ Deploy complete"
+10 -14
View File
@@ -18,19 +18,9 @@ const dryRun = args.includes("--dry-run");
const publishOrder = [
"workflow-protocol",
"workflow-util",
"workflow-runtime",
"workflow-cas",
"workflow-reactor",
"workflow-register",
"workflow-execute",
"workflow-util-agent",
"workflow-agent-cursor",
"workflow-moderator",
"workflow-agent-kit",
"workflow-agent-hermes",
"workflow-agent-llm",
"workflow-agent-react",
"workflow-template-develop",
"workflow-template-solve-issue",
"workflow-gateway",
"cli-workflow",
];
@@ -71,14 +61,18 @@ for (const name of publishOrder) {
const tagFlag = tag ? `--tag ${tag}` : "";
const cmd = `npm publish --access public ${tagFlag}`;
console.log(`📦 ${name}...`);
if (dryRun) {
console.log(` (dry-run) ${cmd}`);
continue;
}
try {
const out = execSync(cmd, { cwd: pkgDir, stdio: "pipe" }).toString().trim();
const _lastLine = out.split("\n").pop();
} catch (_err) {
console.log(` ✅ published`);
} catch (err) {
console.error(` ❌ failed: ${err.message}`);
failed = true;
break;
}
@@ -92,3 +86,5 @@ for (const [pkgPath, raw] of originals) {
if (failed) {
process.exit(1);
}
console.log(dryRun ? "\n✅ Dry run complete" : "\n✅ All packages published");