Publishing packages
A package project is an ordinary bino project whose bino.toml carries a
[package] table. It is authored in git like any other project - you preview
it, lint it, and review it in pull requests - and bino publish ships it to a
registry as an immutable version.
There is no second manifest file and no separate project type: the presence of
[package] is what makes a project publishable.
Scaffolding one
Section titled “Scaffolding one”The wizard asks for the registry scope, package name, description, visibility,
tags and category and writes them into the [package] table. Every namespaced
manifest already carries @scope/name, so there is nothing to search and
replace afterwards. Non-interactive runs pass the same values with --set, for
example --set Scope=myorg --set Visibility=public -y.
The scaffold is a working example rather than a skeleton:
mocks/ is the convention that makes a package previewable without a consumer:
it holds a dataset and a small report page that renders the package’s
definitions. It is never part of a published package, so bino preview
works out of the box and the mock data never leaves your repository.
The [package] table
Section titled “The [package] table”visibility only takes effect when the package is created. Without it the
package is created private, and bino publish says so on the first publish.
Afterwards the registry owns it - change it in the web UI, not here.
license is an SPDX license expression (MIT, Apache-2.0 OR MIT,
LicenseRef-acme), UNLICENSED for all rights reserved, or
SEE LICENSE IN <file>. The registry validates it and shows it on the package
page. bino publish warns when it is missing.
Naming definitions
Section titled “Naming definitions”Every document a package ships must be named under the package:
@acme/finance-kit- the package’s main definition, at most one;@acme/finance-kit/waterfall- any other definition.
Consumers reference either form with an ordinary ref. bino lint checks this
along with the rest of the package ruleset, which activates automatically when
[package] is present:
It flags definitions named outside the package, artefact and credential kinds
that cannot be published, absolute localPath values, and refs to names that
are neither in the package nor a declared dependency.
What a package may contain
Section titled “What a package may contain”| Documents | .yaml / .yml manifests. One file may hold several ----separated definitions. |
| Resources | .png, .jpg, .jpeg, .webp, .gif, .svg, .csv, .xlsx, .parquet (SVG: no script, max 5 MB) |
| Layout | At most one directory level - components/waterfall.yaml is fine, components/tables/waterfall.yaml is not |
| Size | 50 files, 1 MB per manifest, 50 MB per resource |
Two things are refused before anything is uploaded, whatever include says:
anything under secrets/ or signing/, and any document declaring a
ConnectionSecret or SigningProfile. Symbolic links are refused too - the
file you see would not be the file that ships.
Publishing
Section titled “Publishing”--bump is patch, minor or major; the registry mints the version from it
(the first publish is always 1.0.0). bino publish refuses to run without
--bump unless --dry-run is set. Use --json for a machine-readable
result.
The registry is the validation authority. bino publish runs your local lint
first and prints what it finds, but a package that lints clean can still be
rejected - the registry validates the uploaded tree with its own bino and
engine. When it does reject, the output names both versions:
A gap between those two lines is the usual explanation for a package that is valid locally and invalid remotely.
Republishing and CI
Section titled “Republishing and CI”Publishing the same content twice is not an error. The registry recognises the identical file manifest and reports the version that already carries it:
That makes a re-run of a CI job safe, so publishing on a tag is a two-line step:
Versions are immutable and there is no unpublish. --dry-run is worth the
extra minute in a pipeline that publishes automatically.
On GitHub Actions you can skip the token secret: see Trusted Publishing.
Trusted Publishing from GitHub Actions
Section titled “Trusted Publishing from GitHub Actions”From bino v0.120.0, a GitHub Actions job can publish without a personal access token. The scope owner names the repository and workflow that may publish, and bino proves it is that workflow with the job’s OIDC token:
- bino asks GitHub for an OIDC token whose audience is the registry’s URL.
- The registry checks the token and looks for a matching trusted publisher of the package’s scope.
- It answers with a token that may only publish this one package, for 15 minutes. bino publishes with it, dry run included.
Nothing long-lived is stored in the repository, and the version records the repository, workflow, ref, commit and run it was published from.
Add a trusted publisher
Section titled “Add a trusted publisher”A scope owner adds it on the registry, on the scope’s page under the signing settings, Trusted publishers:
| Field | Value |
|---|---|
| Issuer | GitHub Actions (https://token.actions.githubusercontent.com), the only one |
| Repository | owner/repo, for example acme/reports |
| Workflow | the workflow file’s path, for example .github/workflows/publish.yml |
| Ref | an exact ref such as refs/heads/main or refs/tags/v1.2.0, or empty for any ref |
| Package | a package name in the scope, or empty for every package of the scope |
Every trusted publisher is a publish grant for the scope. With an empty ref, anyone who can push a branch carrying that workflow file can publish, so set a ref and a package where you can. Only jobs for a branch or a tag publish; a pull request job never does.
On the first publish the registry records the repository’s GitHub ids. If the repository is deleted and someone creates a new one under the same name, the registry refuses it. To trust a repository under that name again, remove its trusted publishers, save, and add them back.
The workflow
Section titled “The workflow”There is no BINO_REGISTRY_TOKEN. bino uses Trusted Publishing when the job
can request OIDC tokens and no registry token is configured (in bino.toml,
in BINO_REGISTRY_TOKEN or from bino registry login). A configured token
wins, so add --trusted-publishing to use Trusted Publishing anyway.
The publish token only works for publishing, so bino checks whether the
package exists without it and cannot see a private package. Keep
[package].visibility equal to the package’s visibility, or leave it out
after the first publish; a value that differs is refused by the registry.
--sign --keyless asks GitHub for a second OIDC token, for Sigstore. The
signature then names the publish channel oidc and the run, as the Sigstore
certificate states it. --sign is optional; Trusted Publishing also works
for unsigned publishes and for --sign --key. Keyless signing only works for
public packages.
When the exchange fails, bino publish stops and says why:
- no trusted publisher matches: add the repository, workflow and ref as a trusted publisher of the scope, or fix the ones you added. If the registry says Trusted Publishing is not configured, its operator has to turn it on.
- the registry does not support Trusted Publishing: the registry is too old. Publish with a token instead.
- invalid token: the job is not for a branch or a tag (for example a pull request), or the token is not for this registry.
Signing a release
Section titled “Signing a release”From bino v0.117.0, bino publish --sign signs the release, so consumers can
require it with a [trust] policy and see who
published it. The signature covers the package name, the version and the
digest of the file manifest.
bino first runs a dry run to learn the version the registry will mint and its
digest, checks the digest is the one it computed itself, signs both, and then
publishes with the signature. If another version is published between the two
steps, the registry refuses the signature; run bino publish again. A
registry without signature support is refused before anything is signed.
There are three ways to sign:
| Flags | Signer | Consumers trust it with |
|---|---|---|
--sign --keyless |
the CI workflow, through Sigstore | oidc-issuer + repository + workflow |
--sign --key k.pem |
a long-lived key | key-file (and key) |
--sign --key k.pem --cert-chain c.pem |
a certificate from a company CA | x509-root (and identity) |
--keylessgets a short-lived certificate from the public Sigstore and writes the signature to its public transparency log (Rekor). Anyone can read that log, so bino refuses--keylessfor a package that is not public, and so does the registry. bino needs an OIDC token for it: on GitHub Actions it requests one itself, and elsewhere it readsSIGSTORE_ID_TOKEN. There is no browser login.--keytakes an unencrypted PKCS #8 PEM private key, ed25519 or ECDSA P-256. Generate one withopenssl genpkey -algorithm ed25519 -out acme-signing.pemand give consumers the public key (openssl pkey -in acme-signing.pem -pubout -out acme-signing.pub). Keep the private key out of the package folders.--cert-chainadds the certificate for that key, issued by your company CA: the leaf first, then the intermediates.
A scope can require signed releases. An unsigned publish to it fails with
signature_required.
From GitHub Actions
Section titled “From GitHub Actions”The signature records the run: repository, workflow, ref, commit and run URL,
as the Sigstore certificate states them. This example publishes with a token,
so the signature names the publish channel pat; drop the env block to use
Trusted Publishing instead. Consumers pin the repository and the
workflow:
Consuming it
Section titled “Consuming it”Nothing about consumption is special - see Registry and dependencies: