Automated Release Management
Relevant source files
The following files were used as context for generating this wiki page:
Automated Release Management in Claude-Mem encompasses the tooling and workflows used to version, build, document, and distribute the plugin to the marketplace. The system utilizes a combination of Node.js scripts and GitHub CLI integrations to ensure consistent releases across the stable and beta channels.
The primary objective is to automate repetitive tasks such as version bumping in multiple configuration files, generating changelogs from GitHub release data, and notifying external communication channels (e.g., Discord) upon successful deployment.
Sources: scripts/publish.js, CLAUDE.md:104-106
Core Release Workflow
The release process is orchestrated primarily by the publish.js script. It handles the transition from local development state to a tagged marketplace release through a series of interactive prompts and automated checks.
Release Sequence
The following diagram illustrates the lifecycle of a single release:
The workflow ensures that the working directory is clean and that all tests pass before the version is incremented and pushed to the remote repository.
Sources: scripts/publish.js:20-112
Version Selection
Release management supports standard Semantic Versioning (SemVer) through three primary bump types or a custom override:
| Bump Type | Target Part | Description |
|---|---|---|
| Patch | x.x.X | Used for bug fixes |
| Minor | x.X.0 | Used for new features |
| Major | X.0.0 | Used for breaking changes |
| Custom | Manual | Manually entered valid SemVer string |
Sources: scripts/publish.js:46-75, scripts/publish.js:125-142
Automated Artifact Generation
Several specialized scripts are invoked during or after the release process to maintain project documentation and notification systems.
Changelog Generation
The generate-changelog.js script automates the creation of the CHANGELOG.md file by fetching release data directly from GitHub. It formats the data into the "Keep a Changelog" standard.
- Logic: It uses the GitHub CLI (
gh release list) to fetch the last 1000 releases. - Cleaning: It strips automated footers (e.g., "Generated with Claude Code") and redundant headers from the release bodies to maintain a clean document.
- Ordering: Releases are sorted chronologically with the newest version appearing first.
Sources: scripts/generate-changelog.js:26-90, CLAUDE.md:104-106
Build and Compilation
Release management relies on build-hooks.js to bundle TypeScript source files into executable formats for the plugin.
The build process injects the current version into the binaries using the __DEFAULT_PACKAGE_VERSION__ definition.
Sources: scripts/build-hooks.js:33-138
Distribution and Notifications
Once a release is tagged and pushed, the system handles external communication and multi-language support.
Discord Notifications
The discord-release-notify.js script posts release announcements to a Discord channel. It requires a DISCORD_UPDATES_WEBHOOK environment variable.
- Content: It fetches release notes via
gh release view, cleans them of technical footers, and truncates the description to 2000 characters for Discord embed compatibility. - Metadata: Notifications include installation instructions and links to the official documentation at
docs.claude-mem.ai.
Sources: scripts/discord-release-notify.js:45-125
Multi-Language Support
Documentation distribution includes an automated translation phase for the project's README.
The system supports translation into 30+ languages, preserving code blocks while translating descriptive content. This is typically integrated into the CI/CD pipeline or pre-build scripts.
Sources: scripts/translate-readme/README.md:1-120, README.md:14-41
Conclusion
Automated Release Management provides a robust pipeline for Claude-Mem, ensuring that every version is properly tested, documented, and broadcast. By centralizing version control in publish.js and offloading documentation tasks to specialized scripts like generate-changelog.js and readme-translator, the project maintains a high release velocity with minimal manual overhead.