1
1
mirror of https://github.com/primer/css.git synced 2024-10-03 20:07:58 +03:00

Updating docs to reflect new release workflow

This commit is contained in:
Jon Rohan 2021-04-01 13:36:44 -07:00
parent 01a05b3f19
commit 0e5ab313bc
No known key found for this signature in database
GPG Key ID: B0BBE304A9A0AECB
5 changed files with 17 additions and 104 deletions

17
.github/DEVELOP.md vendored
View File

@ -48,15 +48,6 @@ Then visit http://localhost:8000 to view the site.
The [docs directory](./docs/) contains all of the documentation files in our docs site. Files are nested in the `/content` folder.
### URL tests
We have a script that catches inadvertent URL changes caused by renaming or deleting Markdown docs:
```sh
npm run test-urls
```
This script includes some exceptions for URLs that have been intentionally moved or removed in the process of moving away from the [GitHub Style Guide](https://styleguide.github.com/primer/), and which you will need to modify if you rename or remove either Markdown docs or their `path` frontmatter. See [#641](https://github.com/primer/css/pull/641) for more information.
## Storybook
To borrow a [metaphor from Brad Frost](http://bradfrost.com/blog/post/the-workshop-and-the-storefront/), the [docs site](#docs-site) is Primer CSS's storefront, and [Storybook] is its workshop.
@ -75,15 +66,13 @@ All `html` fenced code blocks in `src/**/*.md` will be rendered as stories and l
## Scripts
Our [`package.json`](package.json) houses a collection of [run-scripts] that we use to maintain, test, build, and publish Primer CSS. Run `npm run <script>` with any of the following values for `<script>`:
* `fresh` does a "fresh" npm install (like `npm install -f`)
* `dist` runs `script/dist`, which creates CSS bundles of all the `index.scss` files in `src/`.
* `check-links` runs a link checker on your local development server (`localhost:3000`, started with `npm start`).
* `lint` lints both our SCSS and JavaScript source files.
* `lint-css` lints our SCSS source files.
* `lint-js` lints the JavaScript source files.
* `stylelint` lints the CSS source files.
* `eslint` lints the JavaScript source files.
* `now-build` and `now-start` are run on [Now] to build and start the docs site server. `now-test` runs them both in order.
* `start` runs the documentation site locally (alias: `dev`).
* `test-urls` compares a (pre-generated) list of paths from the **deprecated** [Primer Style Guide](https://styleguide.github.com/primer/) to files in `pages/css`, and lets us know if we've inadvertently deleted or renamed anything.
* `test` runs our test suite.
The above list may not always be up-to-date. You can list all of the available scripts by calling `npm run` with no other arguments.

83
.github/RELEASING.md vendored
View File

@ -2,68 +2,9 @@
## Prepare the release (in `primer/css`)
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.
1. Create a new release branch from `main` and name it `release-<version>`.
1. Run [`npm version <version>`](https://docs.npmjs.com/cli/version) to update the `version` field in both `package.json` and `package-lock.json`.
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
# Primer CSS [Major|Minor|Patch] Release
Version: 📦 **`0.0.0`**
Approximate release date: 📆 **Mon DD, YYYY**
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 -->
---
### :boom: Breaking Change
- [ ] Description #
### :rocket: Enhancement
- [ ] Description #
### :bug: Bug Fix
- [ ] Description #
### :nail_care: Polish
- [ ] Description #
### :memo: Documentation
- [ ] Description #
### :house: Internal
- [ ] Description #
---
### Ship checklist
- [x] Update the `version` field in `package.json`
- [ ] Merge all PRs
- [ ] Update `CHANGELOG.md`
- [ ] Test the release candidate version with `github/github` (optional)
- [ ] Get approval
- [ ] Merge this PR and [create a new release](https://github.com/primer/css/releases/new)
- [ ] Update `github/github`
- [ ] Tell the world (Slack, Twitter, Team post)
For more details, see [RELEASING.md](https://github.com/primer/css/blob/main/.github/RELEASING.md).
/cc @primer/ds-core
```
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.
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.
1. Wait for your checks to pass, and take note of the version that [primer/publish] lists in your status checks.
**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.
The release process is automated by [changesets]. After you familiarize yourself with how they work. We use an [action workflow integrated in ci](https://github.com/atlassian/changesets#integrating-with-ci).
1. Visit the pull requests page and find the [latest Release tracking pr from primer-css](https://github.com/primer/css/pulls/primer-css). If there isn't one, we'll need to build the next release by merging in PRs with changeset files.
## Test the release candidate (in `github/github`):
@ -88,13 +29,9 @@
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.
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 actions 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 🎉
2. done 🎉
## Update github.com (in `github/github`):
@ -111,15 +48,5 @@
1. Deploy! :rocket:
### Publish the release
1. [Create a new release](https://github.com/primer/css/releases/new) with tag `v<version>`.
2. Copy the changes from the [CHANGELOG] and paste them into the release notes.
3. Publish 🎉
[changelog]: ../CHANGELOG.md
[primer/publish]: https://github.com/primer/publish
[changesets]: https://github.com/atlassian/changesets

View File

@ -1,6 +1,6 @@
The MIT License (MIT)
Copyright (c) 2018 GitHub Inc.
Copyright (c) 2021 GitHub Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -10,28 +10,29 @@
<a aria-label="npm package" href="https://www.npmjs.com/package/@primer/css">
<img alt="" src="https://img.shields.io/npm/v/@primer/css.svg">
</a>
<a aria-label="build status" href="https://github.com/primer/css/actions/workflows/ci.yml">
<img alt="" src="https://github.com/primer/css/actions/workflows/ci.yml/badge.svg">
</a>
<a aria-label="contributors graph" href="https://github.com/primer/css/graphs/contributors">
<img src="https://img.shields.io/github/contributors/primer/css.svg">
</a>
<a aria-label="last commit" href="https://github.com/primer/css/commits/main">
<img alt="" src="https://img.shields.io/github/last-commit/primer/css.svg">
</a>
<a aria-label="join us in spectrum" href="https://spectrum.chat/primer">
<img alt="" src="https://withspectrum.github.io/badge/badge.svg">
</a>
<a aria-label="license" href="https://github.com/primer/css/blob/main/LICENSE">
<img src="https://img.shields.io/github/license/primer/css.svg" alt="">
</a>
</p>
## Migrating
:rotating_light: **If you currently use the `primer` or `primer-`-prefixed npm packages, please read [the migration guide](MIGRATING.md)!**
## Documentation
Our documentation site lives at [primer.style/css](https://primer.style/css). You'll be able to find detailed documentation on getting started, all of the components, our theme, our principles, and more.
## Install
This repository is distributed with [npm]. After [installing npm][install-npm], you can install `@primer/css` with this command:
```sh
$ npm install --save @primer/css
npm install --save @primer/css
```
## Usage
@ -55,9 +56,6 @@ See [DEVELOP.md](./.github/DEVELOP.md) for development docs.
## Releasing (for GitHub staff)
You can find docs about our release process in [RELEASING.md](./.github/RELEASING.md).
## Documentation
The [Primer CSS docs site](https://primer.style/css) is deployed from this repo with [primer/deploy](https://github.com/primer/deploy). See [the development docs](./.github/DEVELOP.md#docs-site) for more info.
## License
[MIT](./LICENSE) &copy; [GitHub](https://github.com/)

View File

@ -1,7 +1,7 @@
{
"name": "@primer/css",
"version": "16.1.2",
"description": "Primer is the CSS framework that powers GitHub's front-end design. primer includes 23 packages that are grouped into 3 core meta-packages for easy install. Each package and meta-package is independently versioned and distributed via npm, so it's easy to include all or part of Primer within your own project.",
"description": "The CSS implementation of GitHub's Primer Design System",
"homepage": "https://primer.style/css",
"author": "GitHub, Inc.",
"license": "MIT",
@ -19,7 +19,6 @@
"design-system"
],
"scripts": {
"fresh": "rm -rf node_modules; npm install",
"dist": "script/dist.js",
"stylelint": "stylelint --quiet src",
"eslint": "eslint deprecations.js __tests__",