# Upload an SPK

> Source: https://developers.specs.com/docs/publishing/upload-a-build

An SPK is a signed SnapOS Package (`.spk`) exported from Lens Studio. The portal validates each upload before you can attach it to a release.

## Upload an SPK

1. Open your Lens in [Lenses](https://developers.specs.com/lenses) and go to the **SPKs** tab.
2. Select **Upload SPK** and choose the `.spk` file.
3. Wait for the SPK to reach **Ready**.

[Uploading from Lens Studio](https://docs.lensstudio.com/publish/submit-and-review/publishing-lens?target=specs#upload-your-specs-lenss-build-from-lens-studio) or [from CI](https://developers.specs.com/docs/publishing/publish-from-ci) produces the same result.

## SPK states

These are the states the **SPKs** tab shows.

| State          | Meaning                                                                                                   |
| -------------- | --------------------------------------------------------------------------------------------------------- |
| **Validating** | The file was received and the platform is inspecting the package.                                         |
| **Ready**      | The SPK passed checks and can be attached to a release.                                                   |
| **Attached**   | The SPK is used by a release.                                                                             |
| **Failed**     | The SPK failed a check or couldn't be processed. The reason is shown on the SPK; fix it and upload again. |

## Validation rules

An SPK is rejected when:

- It was exported as a debug build.
- Its package ID is missing, invalid, or doesn't match the Lens.
- Its build version is missing, isn't `major.minor.patch`, or isn't higher than the highest version already published on any channel.
- It is signed with a different key than earlier releases.
- It is missing an icon.
- It uses a [Snap Cloud project](https://cloud.snap.com/docs) that your organization isn't authorized for.

## Size limit

SPK files must be **25 MB or smaller**. Keep large media remote and load it at runtime when you can.

## Versioning

The build version in the SPK is separate from the release version you choose in the portal:

- **Build version** — set in Lens Studio. It must go up with every SPK you publish, across all channels. Devices only install a strictly higher build version.
- **Release version** — set in the portal (`X.Y.Z`). It must be unique across all channels for the Lens.
