Skip to content

Latest commit

 

History

History
63 lines (44 loc) · 1.9 KB

PUBLISH.md

File metadata and controls

63 lines (44 loc) · 1.9 KB

Publishing to NPM

This document outlines the steps for publishing production and beta releases to NPM.

Publish Production Release

  1. Set Release Versions: Update the version number in the package.json files of the CLI, SDK, and root directory.

  2. Build and Test: Ensure all packages are built and tested.

  3. Update Dependencies:

    • In packages/cli/package.json, replace the wildcard version in dependencies with the specific version you intend to publish. For example, change "@apillon/sdk": "*" to "@apillon/sdk": "1.0.0".
    {
      ...
      "dependencies": {
        ...
        "@apillon/sdk": "1.0.0"
      }
    }
  4. Publish Packages: Use npm publish to publish each package, starting with the base package that has no internal dependencies (like SDK).

  5. Revert Changes: Remember to revert the changes made in step 3 before committing to Git!

Publish Beta Release

  1. Set Beta Version: Assign the beta release version in the package.json files of the CLI and SDK. Use the format X.Y.Z-beta.V.

    {
      "version": "1.0.1-beta.0"
    }
  2. Build and Test: Ensure all packages are built and tested.

  3. Update Dependencies:

    • Similar to the production release, update the internal dependencies in packages/cli/package.json to the beta version you are about to publish.
    {
      ...
      "dependencies": {
        ...
        "@apillon/sdk": "1.0.1-beta.0"
        ...
      }
    }
  4. Publish with Beta Tag: Publish each package with the beta tag using npm publish --tag beta, starting with the base package.

    npm publish --tag beta
  5. Update Beta Version: If re-publishing a beta version, increment the beta version tag (e.g., 1.0.1-beta.1) and repeat the above steps.

  6. Revert Changes: Remember to revert the changes made in step 3 before committing to Git!