Skip to content

bino publish

bino publish ships the current project to a bino registry as a new immutable package version. It works in a package project: an ordinary bino project whose bino.toml carries a [package] table. See Publishing packages for the authoring workflow.

bino publish --bump <patch|minor|major> [flags]

Flags:

  • --bump - how the registry increments the version: patch, minor or major. Required unless --dry-run is set.
  • --dry-run - run the registry’s validation without creating a version.
  • --visibility - public or private. Only used when the package is created; ignored afterwards. Without it (and without [package].visibility) a new package is created private, and the first publish prints a note saying so.
  • --json - print the result as JSON on stdout (progress goes to stderr). A signed publish adds signer and rootKind (keyless, x509 or key).
  • --trusted-publishing - authenticate with the GitHub Actions OIDC token, even when a registry token is configured (bino v0.120.0 and later). Fails outside GitHub Actions. See Credentials.
  • --sign - sign the release (bino v0.117.0 and later). Needs one of:
    • --keyless - Sigstore keyless signing through the public Sigstore. Needs an OIDC token: on GitHub Actions bino requests one itself (the job needs permissions: id-token: write); elsewhere set SIGSTORE_ID_TOKEN. The signature is written to the public Rekor log, so it only works for public packages.
    • --key <file> - sign with a long-lived ed25519 or ECDSA P-256 key, an unencrypted PKCS #8 PEM file (-----BEGIN PRIVATE KEY-----). Encrypted keys and KMS keys are not supported.
    • --key <file> --cert-chain <file> - sign with a key and a certificate from a company CA. The chain file holds the certificate for the key first, then the intermediates. A root in the file is dropped.

See Signing a release.

bino publish picks one way to authenticate, in this order:

  1. A configured token, when there is one: [registry].token in bino.toml, then BINO_REGISTRY_TOKEN, then the token stored by bino registry login.
  2. Trusted Publishing, when there is no configured token and the command runs in a GitHub Actions job with permissions: id-token: write (bino v0.120.0 and later). bino requests an OIDC token for the registry’s URL, swaps it at the registry for a token that may only publish this package for 15 minutes, and publishes with that.

--trusted-publishing skips step 1, so a configured token is ignored. Outside GitHub Actions it fails. A registry without Trusted Publishing, or a scope without a matching trusted publisher, fails the publish with a hint; bino does not fall back to another credential. See Trusted Publishing from GitHub Actions.

The files [package].include selects - by default every canonical manifest folder plus resources/, minus mocks/, reports/ and .bino/. Manifests (.yaml/.yml, each possibly a --- stream) ship as documents; the rest ship as resources, limited to .png, .jpg, .jpeg, .webp, .gif, .svg, .csv, .xlsx and .parquet. An .svg may be at most 5 MB. It is rejected if it has script, on* event handlers, foreignObject, XHTML or MathML elements, a DOCTYPE with an internal subset, @import, image-set(), backslash (CSS escape) in CSS, or any link other than #fragment and data:image/(png|jpeg|gif|webp).

Files may sit at most one directory deep, and a package may hold at most 50 files (1 MB per manifest, 50 MB per resource).

Publishing refuses, before uploading anything: symbolic links, anything under secrets/ or signing/, and any document declaring a ConnectionSecret or SigningProfile.

Set [package].license in bino.toml to an SPDX expression (MIT, Apache-2.0 OR MIT), UNLICENSED or SEE LICENSE IN <file>. bino publish checks the shape locally and warns when it is missing; the registry does the full SPDX check and rejects an unknown id.

bino lint runs first and its findings are printed, but they never block - the registry validates the uploaded package with its own bino and engine and is the authority. A rejection prints the findings together with both sides’ versions, so a skew between your CLI and the registry’s is visible.

Run --dry-run first in any pipeline that publishes automatically: versions are immutable and there is no unpublish.

An AI agent can publish through the MCP server with registry_publish (same bump, dry_run and visibility inputs, plus sign_key, sign_cert_chain and sign_keyless for --sign; key and chain paths must be inside the project), but only when the server was started with --allow-publish; see the security notes.

Check a package without publishing it:

bino publish --dry-run

Publish a bug-fix release:

bino publish --bump patch

Publish from CI:

export BINO_REGISTRY_TOKEN="bino_pat_..."
bino publish --bump minor --json

Publish from GitHub Actions with Trusted Publishing, without a token secret:

bino publish --bump patch --sign --keyless

Sign a release with a key:

bino publish --bump patch --sign --key ~/.bino/acme-signing.pem

Republishing unchanged content is not an error - the registry recognises the identical package and reports the version that already carries it, so a re-run of a job is safe.

  • 0 - published, or already published as an identical version.
  • 1 - configuration error: no [package] table, an invalid one, or a file that cannot be published.
  • 3 - the registry rejected the package or its signature, or was unreachable.