The five public packages are versioned as one fixed group and are published to the public npm registry. Feature branches never publish packages.
The first release must create the npm package pages before Trusted Publishing can be configured.
-
Create the npm
datafe-openorganization, or join it with a role that can publish public packages. Keep at least two owners, enable 2FA, and accept any organization invitation. -
Merge the repository release configuration to
main. The Release workflow creates a Version Packages pull request that changes all package versions from0.0.0to0.1.0. -
Review and merge that Version Packages pull request, then use a clean and up-to-date
maincheckout. -
Authenticate directly against the public npm registry:
npm login --registry=https://registry.npmjs.org/ --auth-type=web npm whoami --registry=https://registry.npmjs.org/
-
Validate and publish the initial
0.1.0packages:pnpm install --frozen-lockfile pnpm test pnpm typecheck pnpm build pnpm check:pack pnpm -r publish --access publicEach package pins
publishConfig.registryto the public npm registry, so a local mirror configuration cannot redirect publishing. -
Confirm that all five packages are public:
npm view @datafe-open/markdown-chart version --registry=https://registry.npmjs.org/ npm view @datafe-open/markdown-chart-echarts version --registry=https://registry.npmjs.org/ npm view @datafe-open/markdown-chart-markdown-it version --registry=https://registry.npmjs.org/ npm view @datafe-open/markdown-chart-react version --registry=https://registry.npmjs.org/ npm view @datafe-open/markdown-chart-vue version --registry=https://registry.npmjs.org/
After the first release, open Settings → Trusted Publisher on each of the five npm package pages and configure:
- Provider: GitHub Actions
- Organization or user:
datafe - Repository:
markdown-chart - Workflow filename:
release.yml - Allowed action:
npm publish - Environment: leave empty
The trusted publisher uses datafe here because that is the GitHub
organization that owns the repository. The npm package scope remains
@datafe-open.
The workflow uses GitHub OIDC and does not require an NPM_TOKEN secret. Run
the Release workflow manually once after all five package settings are saved;
it should complete without publishing an unchanged version.
- Run
pnpm changesetin every pull request that changes a published package. Select the appropriate patch, minor, or major impact and write a consumer-facing summary. Repository-only changes do not need a changeset. - Merge normal pull requests into
main. The Release workflow creates or updates a Version Packages pull request. - Review and merge the Version Packages pull request. The next Release run publishes every unpublished package version and creates the corresponding Git tags and GitHub Releases.
npm versions are immutable. If a release is wrong, publish a corrected patch; do not attempt to overwrite an existing version.