You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+20Lines changed: 20 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -250,6 +250,26 @@ We already have many config options, and we should avoid fixing an issue by addi
250
250
- has workaround using existing options
251
251
- can be addressed with a plugin instead
252
252
253
+
## Release
254
+
255
+
If you have publish access, the steps below explain how to cut a release for a package. There are two phases for the release step: "Release" and "Publish".
256
+
257
+
"Release" is done locally to generate the changelogs and git tags:
258
+
259
+
1. Make sure the git remote for https://github.com/vitejs/vite is set as `origin`.
260
+
2. In the `vite` project root `main` branch, run `git pull` and `pnpm i` to get it up-to-date.
261
+
3. Run `pnpm release` and follow the prompts to cut a release for a package. It will generate the changelog, a git release tag, and push them to `origin`. You can run with the `--dry` flag to test it out.
262
+
4. When the command finishes, it will provide a link to https://github.com/vitejs/vite/actions/workflows/publish.yml.
263
+
5. Click the link to visit the page, and follow the next steps below.
264
+
265
+
"Publish" is done on GitHub Actions to publish the package to npm:
266
+
267
+
1. Shortly in the workflows page, a new workflow will appear for the released package and is waiting for approval to publish to npm.
268
+
2. Click on the workflow to open its page.
269
+
3. Click on the "Review deployments" button in the yellow box, a popup will appear.
270
+
4. Check "Release" and click "Approve and deploy".
271
+
5. The package will start publishing to npm.
272
+
253
273
## Docs Translation Contribution
254
274
255
275
To add a new language to the Vite docs, see [`vite-docs-template`](https://github.com/tony19/vite-docs-template/blob/main/.github/CONTRIBUTING.md).
0 commit comments