Skip to content

Automate npm publication as @node-core/doc-kit with version bump workflow #568

@ovflowd

Description

@ovflowd

Enter your suggestions in details:

Goal: Publish the doc-kit package on npm as @node-core/doc-kit.

Automation: Use a similar workflow for automatically publishing the package on a new version bump as implemented for @node-core/ui-components in the @nodejs/nodejs.org repository.

Details:

  • Automate the npm publish process so that every time a new version of @node-core/doc-kit is released, it is automatically published to npm.
  • Use GitHub Actions to implement this automation, leveraging the workflow already established for @node-core/ui-components in @nodejs/nodejs.org as a reference.
  • The publish.mjs script in ui-components generates a cleaned package.json in dist/, copies documentation, and runs pnpm publish --no-git-checks in the dist directory.
  • The workflow is set up so publishing is triggered on merges to main (after CI success) or via workflow_dispatch. More info and diagrams: docs/package-publishing.md.
  • The monorepo structure supports independent package publishing managed by GitHub Actions.
  • Document any secrets (npm tokens), configuration steps, or permission requirements for publishing—including any changes needed for branch protection, secrets, or CI.

Plan:

  1. Review ui-components publish script and docs.
  2. Adapt a similar workflow and script for use in doc-kit (ensure it strips devDependencies, formats paths, and publishes from dist/).
  3. Create a GitHub Action to trigger the publish job after a version bump, following merge to main or manual trigger—ensure it depends on the successful completion of tests.
  4. Test by bumping @node-core/doc-kit version and verifying an automated npm publish.
  5. Document the setup and maintenance steps in the repository README.

References:

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions