# uip solution publish

> Syntax and options for `uip solution publish`, which uploads a solution `.zip` to a solution feed.

`uip solution publish` uploads a solution `.zip` — produced by [`uip solution pack`](./uip-solution-pack.md#synopsis) — to a **solution feed**. By default the package lands in the tenant feed; pass `--personal-workspace` to target the current user's Personal Workspace feed instead, or `--feed <name-or-key>` to target a specific folder feed. Once a package is published, it is visible to [`uip solution packages list`](./uip-solution-packages.md#uip-solution-packages-list) and can be deployed with [`uip solution deploy run`](./uip-solution-deploy.md#uip-solution-deploy-run).

Publish is an authenticated operation. Run [`uip login`](./authentication.md) first.

:::note
A published package is **not yet deployed**. Publishing only uploads the `.zip` to a feed — it does not create an Orchestrator folder, provision resources, or make the package runnable. Deploy it with [`uip solution deploy run`](./uip-solution-deploy.md#uip-solution-deploy-run) before it appears in the processes list or can be started as a job.

Folder feed support in UiPath CLI will be available in a future release. For more information about folder feeds, see [Solution feed](https://docs.uipath.com/solutions-management/automation-cloud/latest/user-guide/deploying-a-solution#feeds-and-deployment-location) in the Solutions Management documentation.
:::

## Synopsis

```
uip solution publish <packagePath> \
  [--personal-workspace | --feed <name-or-key>] \
  [--package-name <name>] [--package-version <version>] \
  [--wait] [--timeout <seconds>] [--poll-interval <ms>] \
  [--login-validity <minutes>]
```

The command honours the [global options](./global-options.md) and returns the [standard exit codes](./exit-codes.md).

## Arguments

- `<packagePath>` *(required)* — Path to a `.zip` package produced by [`uip solution pack`](./uip-solution-pack.md). The file must exist and have a `.zip` extension; anything else fails with a `Failure` result. A `.nupkg` (a single project's package, e.g. from `uip maestro flow pack`) is explicitly rejected — pack the enclosing solution instead.

## Options

| Long | Value | Default | Description |
|---|---|---|---|
| `--personal-workspace` | flag | off | Upload into the current user's Personal Workspace feed instead of the tenant feed. Resolves the workspace folder key from Orchestrator automatically. Mutually exclusive with `--feed`. |
| `--feed <name-or-key>` | text | — | Publish into a feed by its name or folder key (from [`solution feeds list`](./uip-solution-feeds.md)) instead of the tenant feed. Mutually exclusive with `--personal-workspace`. |
| `--package-name <name>` | text | name from the `.zip` | Publish under this name instead of the one the `.zip` was packed with. Rewrites the archive's `solutionMetadata.json` in memory (with a fresh package version key) — the file on disk is untouched, and bundled project packages keep their own names/versions. Only works on a package produced by `uip solution pack`. |
| `--package-version <version>` | text | version from the `.zip` | Publish under this version instead of the one the `.zip` was packed with. Use it to clear a "version already exists" rejection when you have the packed `.zip` but not the solution source, without re-packing. Same in-memory rewrite as `--package-name`. |
| `--wait` | flag | off | Wait until the published package reaches `Ready` or `Active` state before returning. |
| `--timeout <seconds>` | seconds | `360` | Package-state polling timeout (only relevant with `--wait`). |
| `--poll-interval <ms>` | ms | `5000` | Milliseconds between package state polls. |
| `--login-validity <minutes>` | minutes | `10` | Minimum minutes before token expiration to trigger a refresh. |

## Examples

### Minimal

```bash
uip solution publish ./dist/my-solution_1.0.0.zip
```

### Republish the same .zip under a new version

```bash
uip solution publish ./dist/my-solution_1.0.0.zip --package-version 1.0.1
```

Use this when the feed rejected the package because its name+version already exists and you have the `.zip` but not the solution source. `--package-name` works the same way for the name.

### Publish to the current user's Personal Workspace

```bash
uip solution publish ./dist/my-solution_1.0.0.zip --personal-workspace
```

### Publish into a named feed

```bash
uip solution publish ./dist/my-solution_1.0.0.zip --feed Finance
```

### Scripting — chain pack → publish and capture the package version key

```bash
uip solution pack ./my-solution ./dist --version 1.2.0
KEY=$(uip solution publish ./dist/my-solution_1.2.0.zip --output-filter "PackageVersionKey" --output plain)
echo "Published version key: $KEY"
```

## Data shape (--output json)

```json
{
  "Code": "SolutionPublish",
  "Data": {
    "Status": "Package is published to Orchestrator but not yet deployed",
    "PackageVersionKey": "a1b2c3d4-0000-0000-0000-000000000001",
    "PackageName": "my-solution",
    "PackageVersion": "1.0.0",
    "State": "Ready",
    "NextSteps": "Package is published to Orchestrator but not yet deployed. Deploy/activate it into an Orchestrator folder before it appears in the processes list or can be started as a job."
  }
}
```

- `PackageVersionKey` — GUID identifying this specific version of the package in the feed.
- `PackageName` / `PackageVersion` — the values from the package (or the `--package-name`/`--package-version` override); re-use them on `deploy run --package-name --package-version`.
- `State` — only present when `--wait` was used; the terminal package state (`Ready` or `Active`).

## Version conflicts

Publishing a package whose `name + version` already exists in the target feed fails with a descriptive error. Either:
- Increment the version and re-pack: `uip solution pack <solution-path> <output-path> --version <new-version>`, or
- Republish the same `.zip` under a new version without re-packing: `uip solution publish <package-path> --package-version <new-version>`.

## Failure modes

- **The account has no permission to publish to the feed (HTTP 403).** Fails with `ErrorCode: permission_denied` and `Retry: RetryWillNotFix`. The message names the feed and the permissions that publishing needs: `SolutionPackages.Create` on the tenant or `FolderSolutionPackages.Create` on the feed's folder, and for an External Application the `Solutions.Packages.Write` scope. Under a user login, `Instructions` also gives the Personal Workspace route: publish with `--personal-workspace`, then run [`uip solution deploy run`](./uip-solution-deploy.md#uip-solution-deploy-run) with `--personal-workspace`. An External Application has no Personal Workspace.
- **The package file does not exist.** Fails with `ErrorCode: not_found`.
- **The file is not a `.zip`, is not a package produced by `uip solution pack`, or is a single project's `.nupkg`.** Fails with `ErrorCode: invalid_argument`.

## Related commands

- [`uip solution pack`](./uip-solution-pack.md) — produces the `.zip` to publish.
- [`uip solution feeds list`](./uip-solution-feeds.md) — find a feed's name or key for `--feed`.
- [`uip solution packages list`](./uip-solution-packages.md#uip-solution-packages-list) — see published versions.
- [`uip solution packages delete`](./uip-solution-packages.md#uip-solution-packages-delete) — remove a published version.
- [`uip solution deploy run`](./uip-solution-deploy.md#uip-solution-deploy-run) — deploy the published package to Orchestrator.

## See also

- [Your first pipeline](./first-pipeline.md) — pack → publish → deploy run walkthrough.
- [Authentication](./authentication.md) — session management.
- [`uip solution` overview](./uip-solution.md).
