workspace publish
workspace publish publishes the remote draft as a new version. online means published and obtainable; the draft's immutable executionTargets decide whether that version can execute on Server or download to macOS/Windows. Publish requests for one workflow receive serial version numbers so concurrent requests cannot reuse one version. Server manages version numbers, and the CLI does not accept manual --version.
For a Kanban with mutually confirmed related projects, passing --project-group or --dependency creates and uploads a project group from local source and then publishes that deployment. It uses the same project-group v1 protocol as upload --publish-group; included projects publish first and the root Kanban activates last. To continue an existing deployment, use only publish --deployment <id>; local paths and project-group creation parameters cannot be combined with it.
Kanban publish does not perform a dependency install, front-end build, or runtime build, and always keeps the artifactDir, HTML entry, and all uploaded static resources configured in draft in source mode; even if --source-mode bundled is passed in, the server will publish in source mode. Developers need to build Vue, React, Vite and other projects before uploading.
publish Locates remote items based on top-level package.json.id UUID. CLI will first read UUID in the local package. If workflow has not bound the server UUID, or the current account is not the project owner/manager and does not have global publishing permission, the command will fail directly.
Command Format
pnpm exec workflow-code workspace publish <workflow> [--release-log <text>] [--source-mode bundled|source] [--server-runtime|--no-server-runtime] [--desktop-platform macos|windows] [--project-group] [--path <workflow-dir>] [--dependency <alias>=<path>] [--create]
pnpm exec workflow-code workspace publish --deployment <id>
Parameter
| Parameter | Description |
|---|---|
<workflow> | The remote workflow name. |
--release-log <text> | Release log. If it is not passed, it is processed according to the server default behavior. |
--source-mode <bundled|source> | Workflow/Conversation source code mode of the solidified version. By default, bundled;Kanban always uses source. |
--server-runtime / --no-server-runtime | Explicitly assert the publish Server target. It must match the prepared draft or Server returns 409. |
--desktop-platform <macos|windows> | Explicitly assert a Desktop target; repeatable, must match the draft, and requires source. With only this flag, CLI reads the remote project type so Kanban keeps Server disabled by default. |
--project-group | Create a project group from the local Kanban and selected related projects, then publish it after preparation. |
--path <workflow-dir> | The project team’s local directory at Kanban. |
--dependency <alias>=<path> | Treat the local project for a mutually confirmed relation alias as an included dependency; repeatable. Data access remains governed by both projects' projectInfo. |
--create | Ensure that the root project and the included dependencies have been created and bound in Server UUID. |
--deployment <id> | Continue deploying the project group’s pre‑prepared deployment; it must be used independently and should not read from the local project. |
API
| Steps | Endpoint |
|---|---|
| Release draft | POST /api/workflows/{workflow}/publish |
| Release Project Team | POST /api/deployments/{deploymentId}/publish |
Output
| Situation | Output |
|---|---|
| Publish succeeds | Server publish API JSON. |
| No draft is available for publishing. | The server returned an error JSON, with exit code 1. |
| Not logged in | Output error message with exit code 1. |
Example
pnpm exec workflow-code workspace publish hello
pnpm exec workflow-code workspace publish hello --release-log "Fix input validation"
pnpm exec workflow-code workspace publish hello --server-runtime --desktop-platform macos --source-mode source --release-log "Cloud and macOS"
pnpm exec workflow-code workspace publish hello --no-server-runtime --desktop-platform windows --release-log "Windows local release"
pnpm exec workflow-code workspace publish stock-kanban \
--path ./stock-kanban \
--dependency stocks=./stock-workflow \
--release-log "Publish the market board project group"
pnpm exec workflow-code workspace publish --deployment 00000000-0000-4000-8000-000000000010
Precautions
| Scene | Description |
|---|---|
| Needs to be uploaded and published immediately. | You can use upload --release-log. |
| Need to check the latest. | Use versions, where status will display preparing/online/offline. |
Imported --version | Currently, CLI will result in an error; the version number is generated by the system. |
| Missing UUID or the remote project has not been created. | Declare a valid UUID in the package first, then run upload --create to create that exact Server project. |
| Release targets omitted | Publish inherits the prepared draft policy. Resend targets explicitly only when you need a consistency assertion. |
| Explicit targets differ from the draft | Server returns 409 and never promotes a no-runtime draft into a Server version. Retry with the preparation parameters or upload again. |
| The local project team deploys directly. | Use --project-group or at least one --dependency; publish will handle packaging, uploading, and publishing, so there’s no need to upload --publish-group again. |
| Project-group publication is interrupted | Rerun publish --deployment <id> with the deployment record ID. Server skips dependencies that already succeeded with the same hash, then activates the root Kanban project. |