All publishable packages in this repository use a pull-request-driven release flow. GitHub Actions prepares a release PR containing the version bump and changelog, and merging that PR triggers publishing.
- Run the Prepare Release workflow from the
mainbranch. - Select the package to release.
- Select a
releasetype. The defaultnextcreates the next patch for a stable version or advances an existing prerelease. Alternatively, select another supported release type or enter an exactversion, which takes precedence overrelease. Prereleases must use analphaorbetaidentifier so npm assigns the correct distribution tag. - Wait for
vite-release-botto open the release PR. The PR contains the selected package's version bump and changelog entry.
The plugin-react and plugin-react-swc releases move their manually maintained Unreleased notes under the new version. The plugin-rsc release generates its changelog from conventional commits.
- Review the generated version and changelog, and wait for the release PR checks to pass.
- Merge the PR while retaining the
release: <package>@<version>commit subject. A matching commit at the tip ofmaintriggers the publish job. - Open the Publish Package run and approve its
Releaseenvironment deployment. - Wait for the workflow to publish the package, create the
<package>@<version>tag, and create the corresponding GitHub release. - Verify the new version on npm and check that the tag and GitHub release point to the merged release commit.
The release flow depends on configuration outside this repository:
- The
vite-release-botGitHub App must be installed only onvitejs/vite-plugin-reactwith Contents and Pull requests read/write permissions. Webhooks must be disabled. RELEASE_GITHUB_APP_CLIENT_IDmust be a repository variable containing the app client ID.RELEASE_GITHUB_APP_PRIVATE_KEYmust be a repository secret containing the app private key.- The
Releaseenvironment must require maintainer approval before publishing. - The npm trusted publishers for
@vitejs/plugin-react,@vitejs/plugin-react-swc, and@vitejs/plugin-rscmust be restricted tovitejs/vite-plugin-react,.github/workflows/publish.yml, and theReleaseenvironment.
- If release preparation fails, fix the cause and rerun the preparation workflow. Each run creates a uniquely named branch.
- If publishing fails before npm accepts the package, fix the cause and rerun the failed workflow.
- If npm publishing succeeds but tag or GitHub release creation fails, do not rerun the entire publish job blindly because npm versions are immutable. Confirm the package state first, then manually create and push the
<package>@<version>tag at the original release commit and create the GitHub release from the corresponding changelog entry. - If the release tag already exists, investigate whether the package was previously published before retrying or changing any release state.