Doctor uses uppt to create release PRs and publish the vite-doctor package to npm. Merging the release PR is the approval: the workflow publishes without a further step on npm.
Before merging the first release PR:
- In the repository's Settings → Actions → General → Workflow permissions, enable Allow GitHub Actions to create and approve pull requests.
- Create a GitHub environment named
npm. Restrict its deployment tags tov*. - In the existing
vite-doctorpackage's npm access settings, configure a GitHub Actions trusted publisher with ownerloadsheet, repositoryvite-doctor, workflowrelease.yml, and environmentnpm. Enable thenpm publishpermission.
The workflow uses GITHUB_TOKEN and npm OIDC trusted publishing. It does not need an npm token secret.
- Merge changes into
mainusing conventional commit titles such asfix: ...orfeat: .... On each push, uppt creates or updates a draftrelease/vX.Y.ZPR from the changes since the previous release. - Review the proposed version and release notes, mark the PR ready, and merge it.
- Wait for the Release workflow to verify the merged commit. It runs formatting, build, lint, unit tests, and packed-package checks, including Linux, macOS, and Windows on Node 22.20.0 and 24. Release PRs created with
GITHUB_TOKENmay not run normal PR CI, so this verification is required before tagging. - The workflow creates the version tag and GitHub release, then dispatches a run on that tag. That run verifies the tagged commit, builds and packs the root package, and publishes its tarball to npm with provenance. The publish job does not check out or build repository code.
- Confirm the version and dist-tag on npm. A GitHub release alone does not mean the npm package is available.
pnpm pack builds Doctor through prepack. The docs workspace is not published. PR and main preview packages continue through pkg-pr-new.
The publish workflow preserves the existing dist-tag mapping: -alpha versions use alpha, -beta versions use beta, -rc versions use rc, and other versions use latest. This mapping does not add a prerelease-version selector to uppt's generated release PRs. Use only the supported prerelease channels when preparing a prerelease tag.
pnpm install --frozen-lockfile
pnpm release:check
pnpm pack --pack-destination artifactsThe packed-package check installs the tarball in a temporary consumer and checks exports, the vite-doctor CLI, the nuxt-doctor shim, and nuxt doctor. Run pnpm exec vp fmt to fix formatting before repeating the read-only release checks.
If verification fails before tagging, fix the failure before retrying. If the fix changes repository code, prepare a new release commit; rerunning verification still checks the original merged commit.
If the tag exists but packing or publishing failed, dispatch the Release workflow on that exact tag:
gh workflow run release.yml --repo loadsheet/vite-doctor --ref vX.Y.ZDispatching on a branch does not publish. Dispatching on a version tag reruns all release checks before packing. Pushing a tag alone no longer starts a release.
A rerun skips a version that is already on npm. If a version went out with the wrong dist-tag, fix it with npm dist-tag add vite-doctor@X.Y.Z <tag>. An already published version can't be replaced and requires a new version number.