Skip to content

Commit 5498565

Browse files
Copilotabernier
andcommitted
Update documentation for changeset workflow
Co-authored-by: abernier <[email protected]>
1 parent b13d264 commit 5498565

File tree

2 files changed

+47
-8
lines changed

2 files changed

+47
-8
lines changed

.changeset/README.md

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,32 @@
11
# Changesets
22

3-
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works with multi-package repos, or single-package repos to help you version and publish your code. You can find the full documentation for it [in our repository](https://github.com/changesets/changesets)
3+
This folder contains changeset files that describe changes to be released.
44

5-
We have a quick list of common questions to get you started engaging with this project in [our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
5+
## What is a Changeset?
6+
7+
A changeset is a description of changes made in a pull request. It helps automate version bumps and changelog generation.
8+
9+
## How to create a Changeset
10+
11+
When you make changes that should be published to npm, run:
12+
13+
```bash
14+
yarn changeset
15+
```
16+
17+
This will:
18+
1. Prompt you to select the type of change:
19+
- `patch`: Bug fixes and minor changes (0.0.x)
20+
- `minor`: New features (0.x.0)
21+
- `major`: Breaking changes (x.0.0)
22+
2. Ask for a description of the changes
23+
3. Generate a markdown file in `.changeset/` that you commit with your PR
24+
25+
## Release Process
26+
27+
When PRs with changesets are merged to `master`:
28+
1. The Changesets GitHub Action creates a "Version Packages" PR
29+
2. This PR updates version numbers and changelogs
30+
3. When merged, the packages are automatically published to npm
31+
32+
For more information, see the [Changesets documentation](https://github.com/changesets/changesets).

CONTRIBUTING.md

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ You'll find a sample [`Example.tsx`](src/core/Example.tsx) component and its ass
1717

1818
## Commit Guidelines
1919

20-
Be sure your commit messages follow this specification: https://www.conventionalcommits.org/en/v1.0.0-beta.4/
20+
Be sure your commit messages are clear and descriptive. While we use Changesets for versioning (so conventional commits are not strictly required), clear commit messages are still appreciated.
2121

2222
## Storybook
2323

@@ -30,10 +30,22 @@ If you're adding a brand new feature, you need to make sure you add a storybook
3030

3131
## Publishing
3232

33-
We use `semantic-release-action` to deploy the package. Because of this only certain commits will trigger the action of creating a release:
33+
We use [Changesets](https://github.com/changesets/changesets) to manage versions and publishing.
3434

35-
- `fix:` will create a `0.0.x` version
36-
- `feat:` will create a `0.x.0` version
37-
- `BREAKING CHANGE:` will create a `x.0.0` version
35+
### Creating a changeset
3836

39-
We release on `master`, `beta` & `alpha`. `beta` & `alpha` are configured to be prerelease. Any other commits will not fire a release.
37+
When you make changes that should be published, you need to create a changeset:
38+
39+
1. Run `yarn changeset` (or `npx changeset`)
40+
2. Select the type of change:
41+
- `patch` for bug fixes (0.0.x)
42+
- `minor` for new features (0.x.0)
43+
- `major` for breaking changes (x.0.0)
44+
3. Provide a description of your changes
45+
4. Commit the generated changeset file with your PR
46+
47+
### Release process
48+
49+
When your PR is merged to `master`, the Changesets GitHub Action will:
50+
- Create a "Version Packages" PR that updates versions and changelogs
51+
- When the Version Packages PR is merged, it will automatically publish to npm

0 commit comments

Comments
 (0)