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
+51-2Lines changed: 51 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -153,13 +153,62 @@ $ vim README.md
153
153
$ yarn run check
154
154
```
155
155
156
-
##Releasing a new version to NPM
156
+
### Using changesets
157
157
158
-
_Only for project administrators_.
158
+
Our official release path is to use automation to perform the actual publishing of our packages. The steps are to:
159
+
160
+
1. A human developer adds a changeset. Ideally this is as a part of a PR that will have a version impact on a package.
161
+
2. On merge of a PR our automation system opens a "Version Packages" PR.
162
+
3. On merging the "Version Packages" PR, the automation system publishes the packages.
163
+
164
+
Here are more details:
165
+
166
+
### Add a changeset
167
+
168
+
When you would like to add a changeset (which creates a file indicating the type of change), in your branch/PR issue this command:
169
+
170
+
```sh
171
+
$ yarn changeset
172
+
```
173
+
174
+
to produce an interactive menu. Navigate the packages with arrow keys and hit `<space>` to select 1+ packages. Hit `<return>` when done. Select semver versions for packages and add appropriate messages. From there, you'll be prompted to enter a summary of the change. Some tips for this summary:
175
+
176
+
1. Aim for a single line, 1+ sentences as appropriate.
177
+
2. Include issue links in GH format (e.g. `#123`).
178
+
3. You don't need to reference the current pull request or whatnot, as that will be added later automatically.
179
+
180
+
After this, you'll see a new uncommitted file in `.changesets` like:
181
+
182
+
```sh
183
+
$ git status
184
+
# ....
185
+
Untracked files:
186
+
(use "git add <file>..." to include in what will be committed)
187
+
.changeset/flimsy-pandas-marry.md
188
+
```
189
+
190
+
Review the file, make any necessary adjustments, and commit it to source. When we eventually do a package release, the changeset notes and version will be incorporated!
191
+
192
+
### Creating versions
193
+
194
+
On a merge of a feature PR, the changesets GitHub action will open a new PR titled `"Version Packages"`. This PR is automatically kept up to date with additional PRs with changesets. So, if you're not ready to publish yet, just keep merging feature PRs and then merge the version packages PR later.
195
+
196
+
### Publishing packages
197
+
198
+
On the merge of a version packages PR, the changesets GitHub action will publish the packages to npm.
199
+
200
+
### Manually Releasing a new version to NPM
201
+
202
+
<details>
203
+
<summary>
204
+
<i>Only for project administrators</i>
205
+
</summary>
159
206
160
207
1. Update `CHANGELOG.md`, following format for previous versions
161
208
2. Commit as "Changes for version VERSION"
162
209
3. Run `npm version patch` (or `minor|major|VERSION`) to run tests and lint,
163
210
build published directories, then update `package.json` + add a git tag.
164
211
4. Run `npm publish` and publish to NPM if all is well.
0 commit comments