vlt / docs

  • PricingBenchmarks (opens in new window)Community (opens in new window)Feedback
  • Overview
  • bugs
  • build
  • cache
  • config
  • create
  • docs
  • exec-cache
  • exec-local
  • exec
  • help
  • init
  • install
  • list
  • login
  • logout
  • pack
  • ping
  • pkg
  • publish
  • query
  • registry
  • repo
  • run-exec
  • run
  • setup
  • token
  • uninstall
  • version
  • whoami
  • Options
  • tag
  • access
  • otp
  • publish-directory
  • Publishing in CI
  • Service token
  • OIDC
  1. Client
  2. /
  3. Commands
  4. /
  5. publish

vlt publish

Usage:

Terminal
$ vlt publish

Create a tarball from a package and publish it to the configured registry. This command will pack the package in the current directory or specified folder, and then upload it to the configured registry.

Options

tag

Publish the package with the given tag

Terminal
$ vlt publish --tag=<tag>

access

Set access level (public or restricted)

Terminal
$ vlt publish --access=<level>

otp

Provide an OTP to use when publishing a package.

Terminal
$ vlt publish --otp=<otp>

publish-directory

Directory to use for pack and publish operations instead of the current directory. The directory must exist and nothing will be copied to it.

Terminal
$ vlt publish --publish-directory=<path>

Publishing in CI

Service token

For the vlt.io registry, publish from CI with a service token. A personal token answers every publish with a one-time-password challenge and fails unattended with EOTP. Set it as VLT_TOKEN:

github-actions.yml
      - run: vlt publish
      env:
        VLT_TOKEN: ${{ secrets.VLT_TOKEN }}

See CI & automation for the full workflow, and Authentication — CI for how token environment variables are named.

OIDC

If your CI provider supports OpenID Connect, vlt can publish without any stored tokens. On GitHub Actions, add id-token: write to your job's permissions and vlt handles authentication automatically.

note

This requires a registry that supports OIDC trusted publishing. The vlt.io registry currently does not — use a service token there.

See Authentication — OIDC for full details on supported providers and configuration.

github-actions.yml
jobs:
publish:
  runs-on: ubuntu-latest
  permissions:
    contents: read
    id-token: write
  steps:
    - uses: actions/checkout@v4
    - uses: vltpkg/setup-vlt@v1
    - run: vlt publish

PreviouspkgNextquery

On this page

  • Options
  • tag
  • access
  • otp
  • publish-directory
  • Publishing in CI
  • Service token
  • OIDC
Edit this page

Deploy your package on vlt.io

Publish scoped and private packages, manage organizations and access, and give every developer and CI environment a consistent source for public and private JavaScript dependencies.

Publish now