Publish an npm package.
Format, validate, tag, and push a tag for an npm package so GitHub Actions can publish it.
$0 — Package name: cms-utils, cms-react, or admin$1 — (Optional) Version to publish, e.g. 1.6.0. If omitted, read from the package's package.json.If no package name is provided, ask the user which package to publish.
Note: To publish the backend Python package (
deepsel-cms) to PyPI, use/publish-backendinstead. To publish the Docker image to GHCR, use/publish-dockerinstead.
| Name | Workspace | Tag format | package.json path |
|---|
cms-utils | packages/cms-utils | cms-utils-v{version} | packages/cms-utils/package.json |
cms-react | packages/cms-react | cms-react-v{version} | packages/cms-react/package.json |
admin | admin | admin-v{version} | admin/package.json |
cms-react depends on cms-utils. admin depends on both. client depends on both.
If publishing cms-react, build cms-utils first.
If publishing admin, build cms-utils and cms-react first.
When a package is published, update the version in all consumers that depend on it.
Only update dependencies that use a caret range (e.g. ^1.5.0). Skip "*" — it already matches everything.
| Published package | Consumers to update |
|---|---|
cms-utils | packages/cms-react/package.json, client/package.json, themes/*/package.json |
cms-react | client/package.json, themes/*/package.json |
admin | (none) |
package.json.npm view @deepsel/{package} version 2>/dev/nullpackage.json is already published, auto-bump:
git log --oneline {tag}..HEAD -- {workspace}/src/) and unstaged changes (git diff HEAD -- {workspace}/src/).package.json accordingly using semver rules.package.json, update package.json to match.Run formatting for the target package:
# For cms-utils or cms-react:
npm run format --workspace=packages/{name}
# For admin:
npm run format --workspace=admin
Run the full prepush pipeline for the target package. This includes tests, linting, format check, and build.
# For cms-utils:
npm run prepush --workspace=packages/cms-utils
# For cms-react (must build cms-utils first):
npm run build --workspace=packages/cms-utils
npm run prepush --workspace=packages/cms-react
# For admin (must build dependencies first):
npm run build --workspace=packages/cms-utils
npm run build --workspace=packages/cms-react
npm run build:lib --workspace=admin
If any step in prepush fails:
Do NOT skip or ignore failures. Every check must pass.
Update all consumer package.json files listed in the Consumer Map above:
^{version} (e.g. "@deepsel/cms-utils": "^1.5.1")."*" — leave them as-is.npm install from the repo root to update the lockfile.If any files were changed in Steps 2-5 (fixes, version bump, consumer updates):
package.json, any consumer package.json files, package-lock.json, and any code fixes.fix: prepare {package} v{version} for publish# Create annotated tag
git tag -a {package}-v{version} -m "{package} v{version}"
# Push ONLY the tag, not main
git push origin {package}-v{version}
git ls-remote --tags origin | grep {package}-v{version}{package}-v{version} pushed — GitHub Actions will publish to npm.git push origin mainhttps://github.com/DeepselSystems/deepsel-cms/actions--no-verify when committing.