# Package, release and publish

> What a package holds, how a GitHub release carries it, and how an extension gets listed, updated or blocked.

Page: https://songstress.app/docs/develop/publish/

## The package [#the-package]

A package travels as one ZIP archive, `<id>-<version>.songstress`: the file an admin uploads, the asset of a GitHub
release, what `songstress dev` sends. `songstress pack` writes it. Its root is your extension's root, with
`songstress.json` at the top. A server installs it only when all of this holds:

- It is at most 32 MiB, holds at most 512 entries, and unpacks to at most 64 MiB, no file over 16 MiB.
- It is one plain archive: nothing before its first file or after its directory, nothing hidden between files, no
  shared data, no encryption, not ZIP64, each file stored or deflated.
- Every path is a plain path, at most 200 bytes and 8 folders deep, UTF-8, with no two paths naming one file on a
  file system that ignores case or Unicode normalisation. No links, devices or pipes.
- Every file is JavaScript (`.js`), JSON, a source map (`.map`), HTML, CSS, Markdown, text, PNG, JPEG or WebP, each
  extension in lowercase; or a `LICENSE`, `LICENCE`, `NOTICE`, `COPYING`, `README`, `CHANGELOG` or `AUTHORS`. Text is
  UTF-8, so no native binary and no bytecode passes, whatever its name.
- Nothing runs when it is installed: no `node_modules`, and no `package.json` with an install script or dependencies
  to fetch.
- Every file the manifest names is in it, and every image is the type its name says, at the size the manifest states.

## A release [#a-release]

A server installs from a GitHub release, never a branch: a full release (not a draft, not a prerelease) carrying the
package as its one `.songstress` asset, named `<id>-<version>.songstress`. The server holds the asset to the SHA-256
GitHub publishes for it, so upload it as it is. An immutable release, and an attestation of the asset, are shown to
the admin installing it.

| A repository of | Holds | A release is tagged | Its latest release |
| --- | --- | --- | --- |
| One extension | `songstress.json` at its root | The version: `1.2.0` or `v1.2.0` | The repository's latest full release |
| Several | Each in a folder of its own, `<folder>/songstress.json`, each id once | `<id>@<version>`: `acme.tunelog@1.2.0` | The newest full release whose tag names that id |

A link to a repository of one installs its latest release. A link to a repository of several names the extension, or
a release of it; a link to the repository alone is answered with the extensions it holds, to pick from.

The workflows `create-songstress-extension` writes do all of this from a pushed tag:

```sh title="Terminal"
git tag v1.2.0
git push origin v1.2.0
```

`songstress check` says what each release is called.

## Installing without a listing [#installing-without-a-listing]

Anyone can install your extension from its repository's address or its `.songstress` file: an admin opens **Manage ▸
Extensions**, selects **Add extension**, and gives either. Songstress shows what it asks for, and nothing runs until
the admin agrees. See [Install an extension](/docs/extensions/install/).

## Getting listed [#getting-listed]

Two lists show in every server's **Browse extensions**, each a signed index that servers fetch, keep and read offline:

- **The official list** holds Songstress's own extensions, from the
  [songstress-extensions](https://github.com/pacholoamit/songstress-extensions) repository. Its index is signed with
  the owner's Ed25519 keys, which every server has built in, and its `publishers.json` says which publishers are
  Verified. The publisher `songstress` is kept for it.
- **The Marketplace** holds community extensions. Submit your repository's link at
  [songstress.app/extensions/submit](/extensions/submit/); a person reviews it before it is listed. Its index is
  signed by songstress.app with a key of its own, and it can never list, block or change an official extension.

Before you submit, read the [guidelines](/extensions/guidelines/) and run `songstress check --profile listing`: a
listing needs a licence the list accepts, the repository on GitHub, a category, the icon and three to six
screenshots. See [The manifest](/docs/develop/manifest/#install-and-listing).

An install from the Marketplace is pinned to the version and the package's digest it was listed with, and is never
shown as reviewed by Songstress.

## Updates [#updates]

| Installed from | Updates |
| --- | --- |
| The official list | By itself, to the newest version the index lists, once that version has been on the index a day |
| The Marketplace | When an admin asks, from the Marketplace's listings alone |
| A GitHub link | When an admin asks, from the repository's latest full release |
| A file | When an admin installs a newer file |
| `songstress dev` | Each time you push |

An update is the same extension at a newer version, never an older one. One that asks for nothing new is applied at
once, and keeps what was granted. One that asks for more (a permission, a host, a device on the network) waits,
beside the running version, until an admin accepts it.

## The block list [#the-block-list]

Each index carries a block list: an extension's id (every version, or the versions named), or packages by digest
whatever their id. A server reads it with the index and switches off, at once, every install it names. The
Marketplace's block list reaches only what was installed from its listings.
