1
1
mirror of https://github.com/primer/css.git synced 2024-12-02 07:53:06 +03:00
css/RELEASING.md

126 lines
4.4 KiB
Markdown
Raw Normal View History

2019-02-15 21:46:46 +03:00
# Releasing a new version of Primer CSS 🎉
2018-05-11 22:11:53 +03:00
2019-04-15 08:46:01 +03:00
## Prepare the release (in `primer/css`)
2018-05-11 22:11:53 +03:00
2019-04-15 08:46:01 +03:00
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
](https://github.com/primer/css/projects/2#column-4482699) or ask your team members in Slack.
2018-05-11 22:11:53 +03:00
1. Create a new release branch from `main` and name it `release-<version>`.
2018-05-11 22:11:53 +03:00
2019-08-27 19:58:06 +03:00
1. Run [`npm version <version>`](https://docs.npmjs.com/cli/version) to update the `version` field in both `package.json` and `package-lock.json`.
2020-08-03 03:22:01 +03:00
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.
```md
2019-04-25 23:42:54 +03:00
# Primer CSS [Major|Minor|Patch] Release
2020-03-24 06:04:20 +03:00
Version: 📦 **`0.0.0`**
2020-08-03 03:22:01 +03:00
Approximate release date: 📆 **Mon DD, YYYY**
2020-08-03 04:32:38 +03:00
Changes: 🎉 [All merged PRs](https://github.com/primer/css/pulls?q=is%3Apr+is%3Amerged+base%3Arelease-0.0.0) <!-- Update version at the end of the link. E.g. ...release-0.0.0 -> ...release-15.1.0 -->
2020-08-03 03:22:01 +03:00
2020-03-24 06:04:20 +03:00
---
### :boom: Breaking Change
- [ ] Description #
### :rocket: Enhancement
- [ ] Description #
### :bug: Bug Fix
- [ ] Description #
2019-04-25 23:42:54 +03:00
### :nail_care: Polish
- [ ] Description #
2019-04-25 23:42:54 +03:00
### :memo: Documentation
- [ ] Description #
2019-04-25 23:42:54 +03:00
### :house: Internal
- [ ] Description #
2020-03-24 06:04:20 +03:00
---
### Ship checklist
2018-08-02 21:04:24 +03:00
2020-03-24 06:04:20 +03:00
- [x] Update the `version` field in `package.json`
2020-08-03 03:22:01 +03:00
- [ ] Merge all PRs
2019-08-26 09:25:32 +03:00
- [ ] Update `CHANGELOG.md`
2020-08-03 03:22:01 +03:00
- [ ] Test the release candidate version with `github/github` (optional)
2020-08-03 04:32:38 +03:00
- [ ] Get approval
2019-04-15 08:46:01 +03:00
- [ ] Merge this PR and [create a new release](https://github.com/primer/css/releases/new)
- [ ] Update `github/github`
2019-09-18 16:38:45 +03:00
- [ ] Tell the world (Slack, Twitter, Team post)
2019-04-15 08:46:01 +03:00
For more details, see [RELEASING.md](https://github.com/primer/css/blob/main/RELEASING.md).
2018-05-11 22:11:53 +03:00
/cc @primer/ds-core
```
2018-05-11 22:11:53 +03:00
1. Start merging existing PRs into the release branch. Note: You have to change the base branch from `main` to the `release-<version>` branch before merging.
2019-04-15 08:46:01 +03:00
2020-03-24 06:04:20 +03:00
1. Update `CHANGELOG.md` and the PR description. **Tip**: You can copy&paste the changelog from `Checks > changelog > all > changelog`. It gets generated based on adding the `Tag` labels to PRs.
2019-04-15 08:46:01 +03:00
2019-02-15 21:46:46 +03:00
1. Wait for your checks to pass, and take note of the version that [primer/publish] lists in your status checks.
2020-03-24 06:04:20 +03:00
**Tip**: 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.
2018-05-11 22:11:53 +03:00
2019-04-15 08:46:01 +03:00
## Test the release candidate (in `github/github`):
1. Create a new branch in the `github/github` repo, name it `primer-<version>`.
2019-02-15 21:46:46 +03:00
1. Update the Primer CSS version to the published release candidate with:
```sh
bin/npm install @primer/css@<version>-rc.<sha>
```
2018-05-11 22:11:53 +03:00
2019-04-15 08:46:01 +03:00
Then commit and push the changes to `package.json`, `package-lock.json`, `LICENSE` and `vendor/npm`.
2019-02-12 00:25:16 +03:00
2019-04-25 23:42:54 +03:00
1. If you need to make changes to github/github due to the Primer CSS release, do them in a branch and merge _that_ into your release branch after testing.
2018-05-11 22:11:53 +03:00
2019-02-12 00:25:16 +03:00
1. Add or re-request reviewers and fix any breaking tests.
2018-05-11 22:11:53 +03:00
2019-02-12 00:25:16 +03:00
1. Test on review-lab.
2018-05-11 22:11:53 +03:00
2019-02-15 21:46:46 +03:00
2019-04-15 08:46:01 +03:00
## Publish the release (in `primer/css`)
1. If the release PR got approved and you've done necessary testing, merge it.
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.
1. [Create a new release](https://github.com/primer/primer/releases/new) with tag `v<version>`.
1. Copy the changes from the [CHANGELOG] and paste them into the release notes.
1. Publish 🎉
## Update github.com (in `github/github`):
1. Install the latest published version in the same `primer-<version>` branch created earlier with:
2019-02-15 21:46:46 +03:00
```
bin/npm install @primer/css@<version>
```
2018-05-11 22:11:53 +03:00
2019-04-15 08:46:01 +03:00
Then commit and push the changes to `package.json`, `package-lock.json`, `LICENSE` and `vendor/npm`.
2018-05-11 22:11:53 +03:00
2019-02-15 21:46:46 +03:00
1. Fix any breaking tests.
2019-02-12 00:25:16 +03:00
1. Deploy! :rocket:
2018-05-11 22:11:53 +03:00
2019-02-15 21:46:46 +03:00
### Publish the release
2018-05-11 22:11:53 +03:00
2019-04-25 23:42:54 +03:00
1. [Create a new release](https://github.com/primer/css/releases/new) with tag `v<version>`.
2018-05-11 22:11:53 +03:00
2019-02-12 00:25:16 +03:00
2. Copy the changes from the [CHANGELOG] and paste them into the release notes.
2018-05-11 22:11:53 +03:00
3. Publish 🎉
2019-02-12 00:25:16 +03:00
2019-02-12 00:25:16 +03:00
[changelog]: ../CHANGELOG.md
2019-02-15 21:46:46 +03:00
[primer/publish]: https://github.com/primer/publish