Package Publishing: NPM/PyPI Automation
Automate your package release workflow from version bump to published package. Your agent handles changelogs, builds, tests, and registry publishing.
What You Will Get
After this setup, your OpenClaw agent will handle the entire package release process through a single chat command. Tell it to release version 2.1.0, and it bumps the version, generates a changelog from commit history, runs the test suite, builds the package, publishes to your registry, and creates a GitHub release with release notes.
Manual releasing is tedious and error-prone. Forgetting to bump the version, publishing without running tests, or misformatting the changelog are common mistakes that automation eliminates entirely. The agent follows the same process every time, ensuring consistent, reliable releases.
The workflow supports NPM, PyPI, Cargo, and other registries. It adapts to monorepo setups with independent versioning per package, and handles pre-release versions (alpha, beta, rc) with proper semver tagging.
How to Set It Up
Configure your automated publishing pipeline
Install the Package Publishing Skill
Navigate to Skills and install the package-publisher skill. This skill provides version management, changelog generation, registry authentication, build orchestration, and publishing capabilities across multiple package registries.
Configure Registry Credentials
Set up authentication for your target registry in the skill configuration. For NPM, provide your publish token. For PyPI, configure your API token. Store these securely in your agent's credentials manager. The agent never exposes these tokens in logs or chat messages.
Define Your Versioning Strategy
Configure how the agent determines version numbers. Options include manual specification (you tell it the version), automatic semver based on commit types (feat commits bump minor, fix commits bump patch), and calendar versioning. Set the strategy that matches your project's release cadence.
Set Up Changelog Generation
Configure the changelog format. The agent generates changelogs from commit history, grouping changes by type: features, bug fixes, breaking changes, and other categories. Set the format to match your existing CHANGELOG.md style, whether that is Keep a Changelog, Conventional Changelog, or a custom template.
Configure Pre-Publish Checks
Define the checks that must pass before publishing. At minimum, configure the test suite and build command. You can also add linting, type checking, bundle size checks, and license compliance verification. The agent runs all checks sequentially and aborts the release if any fail.
Run a Dry-Run Release
Execute a dry-run release to verify the entire pipeline without actually publishing. The agent performs every step: version bump, changelog generation, tests, build, and packaging, but stops before uploading to the registry. Review the output to ensure everything is correct.
Publish Your First Automated Release
Tell the agent to release your package. It will execute the full pipeline: bump version, generate changelog, run checks, build, publish to the registry, create a Git tag, push the tag, and create a GitHub release with the changelog. The entire process runs in minutes with zero manual intervention.
Tips and Best Practices
Use Conventional Commits
Adopt conventional commit messages (feat:, fix:, chore:, breaking:) so the agent can automatically determine the correct version bump and generate meaningful changelogs. This small discipline pays large dividends in release automation.
Always Run Dry-Runs First
For major version releases or first-time automation, run a dry-run to catch issues before they hit the public registry. A bad publish is difficult to retract, especially if other projects depend on yours.
Automate Pre-Release Versions
Use the agent to publish pre-release versions (2.1.0-beta.1) for testing before the stable release. This lets consumers try new features without risking their production builds.
Frequently Asked Questions
Related Pages
Ready to get started?
Deploy your own OpenClaw instance in under 60 seconds. No VPS, no Docker, no SSH. Just your personal AI assistant, ready to work.
Starting at $24.50/mo. Everything included. 3-day money-back guarantee.