> Documentation index: https://sema4.ai/docs/llms.txt
> Web page: https://sema4.ai/docs/v3/task-engine/publish

# Publish a task package

Get a robot into Sema4.ai: upload it, push it from a terminal with `rcc`, or publish it from a GitHub repository.

**Audience:** builders

> **Task Engine is in private preview.** To get access, [contact us](https://sema4.ai/contact-us/).

## Before you start

- Build the robot and test it locally. See [Develop a task package](https://sema4.ai/docs/v3/task-engine/develop.md).
- Publishing needs builder or admin access to the workspace.

Open **Task Engine** in the app dock, then **Task packages**.
Each package is a robot with one or more tasks, and Workflows run a task from a package.
Select **Publish a task package** and choose how:

| Way                         | Best for                                                            |
| --------------------------- | ------------------------------------------------------------------- |
| **Upload**                  | Publishing a ZIP you built, by hand                                 |
| **Publish from a terminal** | Developers who build with `rcc`, and scripts                        |
| **Publish from GitHub**     | Robots kept in GitHub, published by a person when a commit is ready |

For publishing automatically on every change, from GitHub Actions or GitLab CI, see [Publish from Git with CI/CD](https://sema4.ai/docs/v3/task-engine/publish-from-git.md).

## Upload a ZIP

### Drop the file

Drop the robot's ZIP on **Upload a robot you have built**.
Sema4.ai reads its tasks and checks the file: it must have `robot.yaml` or `package.yaml` with at least one task at its top level, and be at most 100 MB.

### Name the package

A new package gets a name you choose, which must be unique in the workspace.
You can rename it later.

### Publish

The package is published as **v1**.

To publish a new version, open the package and select **Publish a version**.
The dialog says which version it will be, for example **Will be v4 of invoice-entry**.

## Publish from a terminal

Use `rcc`, the same tool the SDK uses, from any terminal or script.

### Set up rcc once

Open the account menu, select **Access credentials**, and create a credential for the machine.
The dialog shows the `rcc configuration credentials` command with your credential and Sema4.ai's address filled in.
Run it once on the machine you publish from.

### Create the package

For a new package, run the command the dialog shows:

```bash
rcc cloud new -w <account-id> -r <package-name>
```

It prints the package ID.
You also find it in the package's details.

### Push each version

From the robot's folder, push a new version:

```bash
rcc cloud push -d <folder> -r <package-id> -w <account-id>
```

The dialog fills in your account ID, which is your workspace's ID, and **Copy account ID** copies it for tools that ask for it.

> **The credential publishes as you.**
> An access credential acts with your access, in every workspace where you can build.
> Create one per machine, and revoke it on the **Access credentials** page when the machine no longer needs it.

## Publish from GitHub

Link a robot folder in a GitHub repository to a package.
Each commit you publish becomes a version.

### Connect GitHub

Publishing from GitHub uses a GitHub connection from **Integrations**.
If none is listed, ask an admin to [connect GitHub](https://sema4.ai/docs/v3/admin/connections/integrations/github.md).

### Choose the robot

In **Publish from GitHub**, choose the connection, the repository, the branch, and the folder that holds the robot, or **Repository root**.
Name the package.

### Publish a commit

The package's **GitHub** section shows the repository it follows and the commit it last published.
When the branch has a newer commit, it says **Update available**. Select publish to make that commit a new version.

Publishing is a deliberate step: a new commit doesn't publish itself.
A package that publishes from GitHub gets its versions only from its repository, so upload and `rcc cloud push` are refused for it.
To stop, disconnect the package from GitHub. Its published versions stay.

## Versions

- **Versions count up from 1** for each package. Every version is kept, with who published it and when.
- **A work item stays on one version.** Its first step that runs a package uses the latest version, and its later steps that run the same package use that same version. Publishing while a work item is between steps doesn't mix code.
- **Resume keeps the version.** Resuming a stopped work item runs the version it started with. Rerunning it from the start uses the latest version.
- **Renaming keeps the package.** Workflows name a package by its ID, so renaming it changes nothing in them.

## Delete a package

A package that a Workflow step runs can't be deleted.
Sema4.ai lists the Workflows that use it and offers to ask the assistant to remove those steps.
Once nothing uses it, delete it from the package's menu.
