Skip to content

Commit

Permalink
chore: readme cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
marcolink committed Feb 12, 2024
1 parent 429c4ec commit af638b9
Showing 1 changed file with 74 additions and 37 deletions.
111 changes: 74 additions & 37 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,59 +180,96 @@ The "Contentful Preview" panel will provide you the matching url for your compon
- `npm run start` runs babel in watch mode and starts Storybook
- `npm run build` build and package your addon code

## Release Management
[//]: # ()
[//]: # (## Release Management)

### Setup
[//]: # ()
[//]: # (### Setup)

This project is configured to use [auto](https://github.com/intuit/auto) for release management. It generates a
changelog and pushes it to both GitHub and npm. Therefore, you need to configure access to both:
[//]: # ()
[//]: # (This project is configured to use [auto](https://github.com/intuit/auto) for release management. It generates a)

- [`NPM_TOKEN`](https://docs.npmjs.com/creating-and-viewing-access-tokens#creating-access-tokens) Create a token with
both _Read and Publish_ permissions.
- [`GH_TOKEN`](https://github.com/settings/tokens) Create a token with the `repo` scope.
[//]: # (changelog and pushes it to both GitHub and npm. Therefore, you need to configure access to both:)

Then open your `package.json` and edit the following fields:
[//]: # ()
[//]: # (- [`NPM_TOKEN`](https://docs.npmjs.com/creating-and-viewing-access-tokens#creating-access-tokens) Create a token with)

- `name`
- `author`
- `repository`
[//]: # ( both _Read and Publish_ permissions.)

#### Local
[//]: # (- [`GH_TOKEN`](https://github.com/settings/tokens) Create a token with the `repo` scope.)

To use `auto` locally create a `.env` file at the root of your project and add your tokens to it:
[//]: # ()
[//]: # (Then open your `package.json` and edit the following fields:)

```bash
GH_TOKEN=<value you just got from GitHub>
NPM_TOKEN=<value you just got from npm>
```
[//]: # ()
[//]: # (- `name`)

Lastly, **create labels on GitHub**. You’ll use these labels in the future when making changes to the package.
[//]: # (- `author`)

```bash
npx auto create-labels
```
[//]: # (- `repository`)

If you check on GitHub, you’ll now see a set of labels that `auto` would like you to use. Use these to tag future pull
requests.
[//]: # ()
[//]: # (#### Local)

#### GitHub Actions
[//]: # ()
[//]: # (To use `auto` locally create a `.env` file at the root of your project and add your tokens to it:)

This template comes with GitHub actions already set up to publish your addon anytime someone pushes to your repository.
[//]: # ()
[//]: # (```bash)

Go to `Settings > Secrets`, click `New repository secret`, and add your `NPM_TOKEN`.
[//]: # (GH_TOKEN=<value you just got from GitHub>)

### Creating a release
[//]: # (NPM_TOKEN=<value you just got from npm>)

To create a release locally you can run the following command, otherwise the GitHub action will make the release for
you.
[//]: # (```)

```sh
npm run release
```
[//]: # ()
[//]: # (Lastly, **create labels on GitHub**. You’ll use these labels in the future when making changes to the package.)

[//]: # ()
[//]: # (```bash)

[//]: # (npx auto create-labels)

[//]: # (```)

[//]: # ()
[//]: # (If you check on GitHub, you’ll now see a set of labels that `auto` would like you to use. Use these to tag future pull)

[//]: # (requests.)

[//]: # ()
[//]: # (#### GitHub Actions)

[//]: # ()
[//]: # (This template comes with GitHub actions already set up to publish your addon anytime someone pushes to your repository.)

[//]: # ()
[//]: # (Go to `Settings > Secrets`, click `New repository secret`, and add your `NPM_TOKEN`.)

[//]: # ()
[//]: # (### Creating a release)

[//]: # ()
[//]: # (To create a release locally you can run the following command, otherwise the GitHub action will make the release for)

[//]: # (you.)

[//]: # ()
[//]: # (```sh)

[//]: # (npm run release)

[//]: # (```)

[//]: # ()
[//]: # (That will:)

[//]: # ()
[//]: # (- Build and package the addon code)

[//]: # (- Bump the version)

That will:
[//]: # (- Push a release to GitHub and npm)

- Build and package the addon code
- Bump the version
- Push a release to GitHub and npm
- Push a changelog to GitHub
[//]: # (- Push a changelog to GitHub)

0 comments on commit af638b9

Please sign in to comment.