diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..a352c71 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,56 @@ +name: Release + +on: + workflow_dispatch: + +jobs: + release: + name: Publish packages + runs-on: ubuntu-latest + permissions: + contents: read + id-token: write + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: '20' + registry-url: 'https://registry.npmjs.org' + + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: '3.13' + + - name: Install capsule-run (PyPI) + run: pip install capsule-run + + - name: Setup pnpm + uses: pnpm/action-setup@v4 + with: + version: 10.21.0 + + - name: Install dependencies + run: pnpm install + + - name: Build WASM sandboxes + run: pnpm prebuild-wasm + + - name: Publish packages in dependency order + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + run: | + for pkg in bash-types bash bash-wasm bash-mcp; do + dir="packages/$pkg" + name=$(node -p "require('./$dir/package.json').name") + version=$(node -p "require('./$dir/package.json').version") + if npm view "$name@$version" version > /dev/null 2>&1; then + echo "$name@$version already published, skipping" + continue + fi + echo "Publishing $name@$version..." + (cd "$dir" && pnpm publish --access public --no-git-checks) + done diff --git a/package.json b/package.json index fb64d95..6ef8186 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,11 @@ "bash-wasm-shell": "pnpm --filter bash-wasm-shell bash-wasm-shell", "prebuild-wasm": "bash ./scripts/prebuild-wasm-sandboxes.sh" }, + "homepage": "https://github.com/capsulerun/bash", + "repository": { + "type": "git", + "url": "https://github.com/capsulerun/bash.git" + }, "dependencies": { "@capsule-run/cli": "^0.8.9", "@capsule-run/sdk": "^0.8.9" diff --git a/packages/bash-mcp/README.md b/packages/bash-mcp/README.md index e0c80cb..15ebdc2 100644 --- a/packages/bash-mcp/README.md +++ b/packages/bash-mcp/README.md @@ -1,4 +1,4 @@ -# `@capsule-run/bash-mcp` +# `Capsule` bash mcp [![MCP Server Release](https://github.com/capsule-run/bash/actions/workflows/mcp-integration-release.yml/badge.svg)](https://github.com/capsule-run/bash/actions/workflows/mcp-integration-release.yml) diff --git a/packages/bash-mcp/package.json b/packages/bash-mcp/package.json index 63442d4..28f78fe 100644 --- a/packages/bash-mcp/package.json +++ b/packages/bash-mcp/package.json @@ -16,6 +16,12 @@ "dev": "tsx watch src/index.ts", "build": "tsup src/index.ts --format esm --dts" }, + "homepage": "https://github.com/capsulerun/bash/tree/main/packages/bash-mcp", + "repository": { + "type": "git", + "url": "https://github.com/capsulerun/bash.git", + "directory": "packages/bash-mcp" + }, "license": "Apache-2.0", "packageManager": "pnpm@10.21.0", "devDependencies": { diff --git a/packages/bash-types/README.md b/packages/bash-types/README.md new file mode 100644 index 0000000..1b56d92 --- /dev/null +++ b/packages/bash-types/README.md @@ -0,0 +1,3 @@ +# @capsule-run/bash-types + +Shared TypeScript types for the [`@capsule-run/bash`](https://github.com/capsule-run/bash) ecosystem. diff --git a/packages/bash-types/package.json b/packages/bash-types/package.json index a2f648f..6aa44e6 100644 --- a/packages/bash-types/package.json +++ b/packages/bash-types/package.json @@ -3,6 +3,12 @@ "version": "0.1.0", "description": "", "type": "module", + "homepage": "https://github.com/capsulerun/bash", + "repository": { + "type": "git", + "url": "https://github.com/capsulerun/bash.git", + "directory": "packages/bash-types" + }, "main": "./src/index.ts", "types": "./src/index.ts", "exports": { diff --git a/packages/bash-wasm/README.md b/packages/bash-wasm/README.md new file mode 120000 index 0000000..fe84005 --- /dev/null +++ b/packages/bash-wasm/README.md @@ -0,0 +1 @@ +../../README.md \ No newline at end of file diff --git a/packages/bash-wasm/package.json b/packages/bash-wasm/package.json index 8a52085..a3f6e70 100644 --- a/packages/bash-wasm/package.json +++ b/packages/bash-wasm/package.json @@ -3,11 +3,21 @@ "version": "0.1.0", "description": "Sandboxed bash for agents", "type": "module", + "homepage": "https://github.com/capsulerun/bash", + "repository": { + "type": "git", + "url": "https://github.com/capsulerun/bash.git", + "directory": "packages/bash-wasm" + }, "main": "./src/index.ts", "types": "./src/index.ts", "exports": { ".": "./src/index.ts" }, + "files": [ + "src", + "dist/sandboxes" + ], "scripts": { "pretest": "pip install -r sandboxes/python/requirements.txt -q", "test": "vitest run" diff --git a/packages/bash/README.md b/packages/bash/README.md new file mode 120000 index 0000000..fe84005 --- /dev/null +++ b/packages/bash/README.md @@ -0,0 +1 @@ +../../README.md \ No newline at end of file diff --git a/packages/bash/package.json b/packages/bash/package.json index 6087065..6b37a2c 100644 --- a/packages/bash/package.json +++ b/packages/bash/package.json @@ -3,6 +3,12 @@ "version": "0.1.0", "description": "Sandboxed bash for agents", "type": "module", + "homepage": "https://github.com/capsulerun/bash", + "repository": { + "type": "git", + "url": "https://github.com/capsulerun/bash.git", + "directory": "packages/bash" + }, "main": "./src/index.ts", "types": "./src/index.ts", "exports": {