diff --git a/.github/workflows/openclaw-cd.yml b/.github/workflows/openclaw-cd.yml new file mode 100644 index 000000000..eaa26768b --- /dev/null +++ b/.github/workflows/openclaw-cd.yml @@ -0,0 +1,43 @@ +name: Publish @mem0/openclaw-mem0 📦 to npm + +on: + release: + types: [published] + +jobs: + build-n-publish: + name: Build and publish @mem0/openclaw-mem0 📦 to npm + if: startsWith(github.event.release.tag_name, 'openclaw-v') + runs-on: ubuntu-latest + permissions: + id-token: write + defaults: + run: + working-directory: openclaw + steps: + - uses: actions/checkout@v4 + + - name: Install pnpm + uses: pnpm/action-setup@v4 + with: + version: 9 + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: '22' + registry-url: 'https://registry.npmjs.org' + cache: 'pnpm' + cache-dependency-path: openclaw/pnpm-lock.yaml + + - name: Upgrade npm for OIDC trusted publishing + run: npm install -g npm@latest + + - name: Install dependencies + run: pnpm install --frozen-lockfile + + - name: Build + run: pnpm build + + - name: Publish to npm + run: npm publish --provenance --access public diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7063614ae..80a9852f6 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -75,6 +75,7 @@ All packages are published automatically via GitHub Actions when a GitHub Releas | `mem0ai` (TypeScript SDK) | npm | `ts-v*` | `ts-v2.4.6` | | `@mem0/cli` (Node CLI) | npm | `cli-node-v*` | `cli-node-v0.1.2` | | `@mem0/vercel-ai-provider` | npm | `vercel-ai-v*` | `vercel-ai-v2.0.6` | +| `@mem0/openclaw-mem0` | npm | `openclaw-v*` | `openclaw-v1.0.1` | #### How to Release diff --git a/openclaw/package.json b/openclaw/package.json index f1f2af2bc..fc9597d0f 100644 --- a/openclaw/package.json +++ b/openclaw/package.json @@ -4,6 +4,11 @@ "type": "module", "description": "Mem0 memory backend for OpenClaw — platform or self-hosted open-source", "license": "Apache-2.0", + "repository": { + "type": "git", + "url": "https://github.com/mem0ai/mem0", + "directory": "openclaw" + }, "keywords": [ "openclaw", "plugin",