@@ -10,6 +10,7 @@ Thank you for your interest in contributing to the `@node-core/doc-kit` project!
1010 - [ Running the Tool Locally] ( #running-the-tool-locally )
1111- [ Development Workflow] ( #development-workflow )
1212 - [ Making Changes] ( #making-changes )
13+ - [ Adding a Changeset] ( #adding-a-changeset )
1314 - [ Submitting Your Changes] ( #submitting-your-changes )
1415- [ Writing Tests] ( #writing-tests )
1516 - [ Test File Organization] ( #test-file-organization )
@@ -22,6 +23,7 @@ Thank you for your interest in contributing to the `@node-core/doc-kit` project!
2223- [ Code Quality] ( #code-quality )
2324 - [ Linting and Formatting] ( #linting-and-formatting )
2425 - [ Pre-commit Hooks] ( #pre-commit-hooks )
26+ - [ Releasing] ( #releasing )
2527- [ Commit Guidelines] ( #commit-guidelines )
2628- [ Developer's Certificate of Origin 1.1] ( #developers-certificate-of-origin-11 )
2729
@@ -151,6 +153,34 @@ The steps below will give you a general idea of how to prepare your local enviro
151153 node --run lint
152154 ```
153155
156+ ### Adding a Changeset
157+
158+ This project uses [ Changesets] [ ] to manage versioning, the changelog, and npm releases. Any change
159+ that affects published behaviour should include a changeset so it shows up in ` CHANGELOG.md ` and
160+ triggers a release.
161+
162+ 1 . ** Create a changeset**
163+
164+ ``` bash
165+ node --run changeset
166+ ```
167+
168+ You'll be prompted for the bump type and a short summary:
169+ - ** patch** — bug fixes and other backwards-compatible changes
170+ - ** minor** — new, backwards-compatible features
171+ - ** major** — breaking changes
172+
173+ The summary becomes the changelog entry, so write it for users of the package.
174+
175+ 2 . ** Commit the generated file**
176+
177+ This writes a Markdown file under ` .changeset/ ` . Commit it alongside your code changes so it
178+ lands with your Pull Request.
179+
180+ > [ !NOTE]
181+ > Changes that don't affect the published package (e.g. tests, CI, or internal docs) don't need a
182+ > changeset. See [ Releasing] ( #releasing ) for what happens to changesets after they're merged.
183+
154184### Submitting Your Changes
155185
1561861 . ** Add and commit your changes**
@@ -303,6 +333,21 @@ You can bypass pre-commit hooks if necessary (not recommended):
303333git commit -m " describe your changes" --no-verify
304334```
305335
336+ ## Releasing
337+
338+ Releases are automated with [ Changesets] [ ] and require no manual version bumps — maintainers never
339+ edit the ` version ` field in ` package.json ` by hand.
340+
341+ When changesets land on ` main ` , the [ ` Release ` workflow] ( .github/workflows/release.yml ) opens (or
342+ updates) a ** "Version Packages"** Pull Request that consumes the pending changeset files, bumps the
343+ version in ` package.json ` , and writes the corresponding ` CHANGELOG.md ` entries.
344+
345+ To ship a release, a maintainer merges that "Version Packages" PR. The same workflow then:
346+
347+ - publishes ` @node-core/doc-kit ` to npm (via [ npm trusted publishing] [ ] — no token required),
348+ - creates the matching ` v<x.y.z> ` git tag, and
349+ - cuts a GitHub Release from the changelog.
350+
306351## Commit Guidelines
307352
308353This project follows the [ Conventional Commits] [ ] specification.
@@ -327,6 +372,8 @@ By contributing to this project, I certify that:
327372 with this project or the open source license(s) involved.
328373```
329374
375+ [ Changesets ] : https://github.com/changesets/changesets
330376[ Conventional Commits ] : https://www.conventionalcommits.org/
331377[ Git ] : https://git-scm.com/downloads
332378[ Husky ] : https://typicode.github.io/husky/
379+ [ npm trusted publishing ] : https://docs.npmjs.com/trusted-publishers
0 commit comments