|
1 | 1 | # Releasing a new version of Primer CSS 🎉 |
2 | 2 |
|
| 3 | +## Prepare the release (in `primer/css`) |
3 | 4 |
|
4 | | -## In this repo |
| 5 | +1. Decide which [PRs](https://github.com/primer/css/pulls) should be part of the next release and if it will be a major, minor or patch `<version>`. You may also check the [release tracking project |
| 6 | +](https://github.com/primer/css/projects/2#column-4482699) or ask your team members in Slack. |
5 | 7 |
|
6 | | -1. Check off all of the boxes in your release PR. |
| 8 | +1. Create a new release branch from `master` and name it `release-<version>`. |
7 | 9 |
|
8 | | -1. Test your changes with the latest release candidate version [in github/github](#in-github-github). |
| 10 | +1. Start merging existing PRs into the release branch. Note: You have to change the base branch from `master` to the `release-<version>` branch before merging. |
9 | 11 |
|
10 | | -1. Once the release PR is approved and you've done necessary testing, merge it. After tests run, the site will be deployed and `@primer/css` will be published with your changes. |
11 | | - |
12 | | -1. Create a new release branch for the next release from `master` and name it `release-<version>`. Please use the following template for the PR description, linking to the relevant issues and/or pull requests for each change, and removing irrelevant headings: |
| 12 | +1. Create a new PR for the `release-<version>` branch. Please use the following template for the PR description, linking to the relevant issues and/or pull requests for each change, removing irrelevant headings and checking off all of the boxes of the ship checklist: |
13 | 13 |
|
14 | 14 | ```md |
15 | 15 | # Primer [Major|Minor|Patch] Release |
|
25 | 25 |
|
26 | 26 | ### :bug: Bug Fix |
27 | 27 | - [ ] Description # |
28 | | - |
| 28 | + |
29 | 29 | ### :nail_care: Polish |
30 | 30 | - [ ] Description # |
31 | | - |
| 31 | + |
32 | 32 | ### :memo: Documentation |
33 | 33 | - [ ] Description # |
34 | | - |
| 34 | + |
35 | 35 | ### :house: Internal |
36 | 36 | - [ ] Description # |
37 | 37 |
|
|
40 | 40 | ### Ship checklist |
41 | 41 |
|
42 | 42 | - [ ] Update `CHANGELOG.md` |
43 | | - - [ ] Update the `version` field in `package.json` to match the release version |
44 | | - - [ ] [Create a new release](https://github.com/primer/css/releases/new) |
45 | | - - [ ] [Update github/github](https://github.com/primer/css/blob/master/RELEASING.md#in-githubgithub) |
46 | | - - [ ] Create a new pull request for the next release |
| 43 | + - [ ] Update the `version` field in `package.json` |
| 44 | + - [ ] Test the release candidate version with `github/github` |
| 45 | + - [ ] Merge this PR and [create a new release](https://github.com/primer/css/releases/new) |
| 46 | + - [ ] Update `github/github` |
| 47 | + |
| 48 | + For more details, see [RELEASING.md](https://github.com/primer/css/blob/master/RELEASING.md). |
47 | 49 |
|
48 | 50 | /cc @primer/ds-core |
49 | 51 | ``` |
50 | 52 |
|
| 53 | +1. Update `CHANGELOG.md` |
| 54 | + |
| 55 | +1. Update the `version` field in `package.json` to match the release version. You may also run the `npm version v<version>` command. |
| 56 | + |
51 | 57 | 1. Wait for your checks to pass, and take note of the version that [primer/publish] lists in your status checks. |
52 | 58 |
|
53 | 59 | **ProTip:** The release candidate version will always be `<version>-rc.<sha>`, where `<version>` comes from the branch name and `<sha>` is the 7-character commit SHA. |
54 | 60 |
|
55 | | -### In `github/github`: |
56 | 61 |
|
57 | | -1. Create a new branch. |
| 62 | +## Test the release candidate (in `github/github`): |
| 63 | + |
| 64 | +1. Create a new branch in the `github/github` repo, name it `primer-<version>`. |
58 | 65 |
|
59 | 66 | 1. Update the Primer CSS version to the published release candidate with: |
60 | 67 |
|
61 | 68 | ```sh |
62 | 69 | bin/npm install @primer/css@<version>-rc.<sha> |
63 | 70 | ``` |
64 | 71 |
|
65 | | - Then commit and push the changes to `package.json`, `package-lock.json`, and `vendor/npm`. |
| 72 | + Then commit and push the changes to `package.json`, `package-lock.json`, `LICENSE` and `vendor/npm`. |
66 | 73 |
|
67 | 74 | 1. If you need to make changes to github/github due to the Primer release, do them in a branch and merge _that_ into your release branch after testing. |
68 | 75 |
|
69 | 76 | 1. Add or re-request reviewers and fix any breaking tests. |
70 | 77 |
|
71 | 78 | 1. Test on review-lab. |
72 | 79 |
|
73 | | -1. Publish `@primer/css` to the `latest` dist-tag by merging the release branch and waiting for [primer/publish] to finish. |
74 | 80 |
|
75 | | -1. Install the latest published version with: |
| 81 | +## Publish the release (in `primer/css`) |
| 82 | + |
| 83 | +1. If the release PR got approved and you've done necessary testing, merge it. |
| 84 | + |
| 85 | + After tests run, the docs site will be deployed and `@primer/css` will be published with your changes to the `latest` dist-tag. You can check [npm](https://www.npmjs.com/package/@primer/css?activeTab=versions) to see if [primer/publish] has finished. |
| 86 | + |
| 87 | +1. [Create a new release](https://github.com/primer/primer/releases/new) with tag `v<version>`. |
| 88 | + |
| 89 | +1. Copy the changes from the [CHANGELOG] and paste them into the release notes. |
| 90 | + |
| 91 | +1. Publish 🎉 |
| 92 | + |
| 93 | + |
| 94 | +## Update github.com (in `github/github`): |
| 95 | + |
| 96 | +1. Install the latest published version in the same `primer-<version>` branch created earlier with: |
76 | 97 |
|
77 | 98 | ``` |
78 | 99 | bin/npm install @primer/css@<version> |
79 | 100 | ``` |
80 | 101 |
|
81 | | - Then commit and push the changes to `package.json`, `package-lock.json`, and `vendor/npm`. |
| 102 | + Then commit and push the changes to `package.json`, `package-lock.json`, `LICENSE` and `vendor/npm`. |
82 | 103 |
|
83 | 104 | 1. Fix any breaking tests. |
84 | 105 |
|
85 | 106 | 1. Deploy! :rocket: |
86 | 107 |
|
87 | 108 |
|
88 | | -### Publish the release |
89 | | - |
90 | | -1. [Create a new release](https://github.com/primer/primer/releases/new) with tag `v<version>`. |
91 | | - |
92 | | -2. Copy the changes from the [CHANGELOG] and paste them into the release notes. |
93 | | - |
94 | | -3. Publish 🎉 |
95 | | - |
96 | 109 | [changelog]: ../CHANGELOG.md |
97 | 110 | [primer/publish]: https://github.com/primer/publish |
0 commit comments