Skip to content

armgit / mem0

Public Imported from GitHub
0

The Memory Layer for AI Agents - Drop-in memory infrastructure for AI agents and apps. Context that persists. Built for production.

feat(cli): add CD workflow and bump version to 0.2.0b1 (#4653)

Saket Aryanc788d771d3c1
diff --git a/.github/workflows/cli-python-cd.yml b/.github/workflows/cli-python-cd.yml
new file mode 100644
index 000000000..316bc1df2
--- /dev/null
+++ b/.github/workflows/cli-python-cd.yml
@@ -0,0 +1,34 @@
+name: Publish mem0-cli 🐍 distributions πŸ“¦ to PyPI
+
+on:
+ release:
+ types: [published]
+
+jobs:
+ build-n-publish:
+ name: Build and publish mem0-cli πŸ“¦ to PyPI
+ if: startsWith(github.event.release.tag_name, 'cli-v')
+ runs-on: ubuntu-latest
+ permissions:
+ id-token: write
+ defaults:
+ run:
+ working-directory: cli/python
+ steps:
+ - uses: actions/checkout@v4
+
+ - name: Set up Python
+ uses: actions/setup-python@v5
+ with:
+ python-version: '3.11'
+
+ - name: Install Hatch
+ run: pip install hatch
+
+ - name: Build a binary wheel and a source tarball
+ run: hatch build --clean
+
+ - name: Publish distribution πŸ“¦ to PyPI
+ uses: pypa/gh-action-pypi-publish@release/v1
+ with:
+ packages-dir: cli/python/dist/
diff --git a/cli/python/README.md b/cli/python/README.md
index 574004c30..f5fda837f 100644
--- a/cli/python/README.md
+++ b/cli/python/README.md
@@ -34,6 +34,13 @@ mem0 search "What are Alice's preferences?" --user-id alice
mem0 list --user-id alice
```
+## Releasing
+
+1. Update `version` in `pyproject.toml`
+2. Create a GitHub Release with tag `cli-v<version>` (e.g. `cli-v0.2.0`)
+
+For a pre-release, use a beta version like `0.2.0b1` and check the **pre-release** checkbox.
+
## License
Apache-2.0
diff --git a/cli/python/pyproject.toml b/cli/python/pyproject.toml
index 1c2b0fd8d..4c7200b5e 100644
--- a/cli/python/pyproject.toml
+++ b/cli/python/pyproject.toml
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
[project]
name = "mem0-cli"
-version = "0.1.0"
+version = "0.2.0b1"
description = "The official CLI for mem0 β€” the memory layer for AI agents"
readme = "README.md"
license = "Apache-2.0"