Skip to content

Commit

Permalink
Merge pull request #2 from mturley/fix-release
Browse files Browse the repository at this point in the history
fix(semantic-release): fix release configuration
  • Loading branch information
mturley authored Aug 24, 2020
2 parents ebcbbcf + 46ee15f commit 0fa457a
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/test-and-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@ jobs:
run: yarn install
- name: Run tests
run: yarn ci
- name: Bundle
run: yarn build
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: yarn run semantic-release
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,22 @@ To export the Storybook docs as a static site (outputs to `./storybook-static`):
yarn storybook:export
```

## Triggering an npm release

This project uses [semantic-release](https://github.com/semantic-release/semantic-release) via GitHub Actions to automate its npm releases. When a PR is merged to master, it is checked for specific key words in the commit message to decide whether a release needs to be made, and whether it will be a minor or major version bump.

To assist in formatting commit messages correctly for this purpose, the repo is set up for use with [Commitizen](http://commitizen.github.io/cz-cli/), which provides a CLI for guided commit messages.

**To make a commit that should trigger a release**:

First, `git add` any changes you want to commit, then:

```sh
yarn commit
```

Follow the prompts based on the scope of your commit. When your commit is merged to master, an automatic release will be triggered and a message will be posted to your PR when it is complete.

## File Structure

Components live in `src/MyComponent/` directories, which should each contain:
Expand Down

0 comments on commit 0fa457a

Please sign in to comment.