php/docs/publish/npm.md
Snider 28d004ff61
Some checks failed
CI / PHP 8.4 (push) Failing after 1m54s
CI / PHP 8.3 (push) Failing after 1m58s
feat: replace Go CLI with PHP framework
Go CLI commands moved to core/go-php. This repo now contains
the Laravel modular monolith framework (previously php-framework).

- Remove all Go files (now in core/go-php)
- Add PHP framework: event-driven module loading, lifecycle events
- Composer package: core/php
- core/php-framework remains as-is for backward compat

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-06 08:49:51 +00:00

1.2 KiB

npm

Publish JavaScript/TypeScript packages to the npm registry.

Configuration

publishers:
  - type: npm
    package: "@org/myapp"
    access: public

Options

Option Description Default
package Package name From package.json
access Access level (public, restricted) restricted
tag Distribution tag latest
directory Package directory .

Examples

Public Package

publishers:
  - type: npm
    package: "@host-uk/cli"
    access: public

Scoped Private Package

publishers:
  - type: npm
    package: "@myorg/internal-tool"
    access: restricted

Beta Release

publishers:
  - type: npm
    tag: beta

Monorepo Package

publishers:
  - type: npm
    directory: packages/sdk

Environment Variables

Variable Description
NPM_TOKEN npm access token (required)

Setup

  1. Create an npm access token:

    npm token create --read-only=false
    
  2. Add to your CI environment as NPM_TOKEN

  3. For scoped packages, ensure the scope is linked to your org:

    npm login --scope=@myorg