Skip to content

Commit 34c7cb4

Browse files
bluwypatak-devydcjeff
authored
docs(contributing): add instructions for releasing (#14197)
Co-authored-by: patak <[email protected]> Co-authored-by: Jeff Yang <[email protected]>
1 parent 6f86de3 commit 34c7cb4

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

CONTRIBUTING.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,26 @@ We already have many config options, and we should avoid fixing an issue by addi
250250
- has workaround using existing options
251251
- can be addressed with a plugin instead
252252

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+
253273
## Docs Translation Contribution
254274

255275
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

Comments
 (0)