Publishing Packages
The vis project contains multiple packages, each of which is published to the Allen Institute NPM organization package registry.
Publishing a New Package
Section titled “Publishing a New Package”Publishing is handled by two GitHub Actions workflows. The Release workflow is triggered manually and handles bumping the version, generating the changelog, and creating a git tag. Pushing that tag then automatically triggers the Publish workflow, which builds and publishes the package to NPM.
When you have a new package to publish, follow these steps:
- Add the necessary information about the repository and the registry to the
package.jsonfile:
"repository": { "type": "git", "url": "https://github.com/AllenInstitute/vis.git" }, "publishConfig": { "registry": "https://registry.npmjs.org", "access": "public" },-
Get all changes onto the
mainbranch and make sure everything is ship-shape for publishing. -
Go to Actions → Release in the GitHub repository, click Run workflow, select the package to release, and run it. The workflow will bump the version, update the changelog, create a tag, and push — which automatically triggers the Publish workflow.
-
Verify your package is available. You can see it listed on the Allen Institute’s NPM organization package registry or on the homepage of this repository.
Updating an Existing Package
Section titled “Updating an Existing Package”When you have changes to an existing package that you want to publish, follow these steps:
-
Get all changes onto the
mainbranch and make sure everything is ship-shape for publishing. -
Go to Actions → Release in the GitHub repository, click Run workflow, select the package to release, and run it. The workflow will automatically determine the next version (following Semantic Versioning) based on commit history, update the changelog, create a tag, and push — which automatically triggers the Publish workflow.
-
Verify that the updated package is available. You can see it listed on the Allen Institute’s NPM organization package registry or on the homepage of this repository.
Troubleshooting
Section titled “Troubleshooting”If any of the previous steps don’t work due to updates in GitHub’s platform, please reference GitHub’s documentation for details and submit a PR updating this documentation.