Skip to content

Commit

Permalink
chore(husky): upgraded the config format to match the installed version
Browse files Browse the repository at this point in the history
  • Loading branch information
travi committed May 29, 2021
1 parent bdd861e commit e136652
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 19 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/node-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ name: Node.js CI
- master
- alpha
- beta
- 'dependabot/**'
- dependabot/**
pull_request:
types:
- opened
Expand All @@ -19,12 +19,12 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Read .nvmrc
run: 'echo ::set-output name=NVMRC::$(cat .nvmrc)'
run: echo ::set-output name=NVMRC::$(cat .nvmrc)
id: nvm
- name: Setup node
uses: actions/setup-node@v1
with:
node-version: '${{ steps.nvm.outputs.NVMRC }}'
node-version: ${{ steps.nvm.outputs.NVMRC }}
- uses: bahmutov/npm-install@v1
- run: npm test
release:
Expand All @@ -33,31 +33,31 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Read .nvmrc
run: 'echo ::set-output name=NVMRC::$(cat .nvmrc)'
run: echo ::set-output name=NVMRC::$(cat .nvmrc)
id: nvm
- name: Setup node
uses: actions/setup-node@v1
with:
node-version: '${{ steps.nvm.outputs.NVMRC }}'
node-version: ${{ steps.nvm.outputs.NVMRC }}
- uses: bahmutov/npm-install@v1
- name: semantic-release
run: npx semantic-release
env:
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
NPM_TOKEN: '${{ secrets.NPM_PUBLISH_TOKEN }}'
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
storybook:
if: github.ref == 'refs/heads/master'
needs: verify
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Read .nvmrc
run: 'echo ::set-output name=NVMRC::$(cat .nvmrc)'
run: echo ::set-output name=NVMRC::$(cat .nvmrc)
id: nvm
- name: Setup node
uses: actions/setup-node@v1
with:
node-version: '${{ steps.nvm.outputs.NVMRC }}'
node-version: ${{ steps.nvm.outputs.NVMRC }}
- uses: bahmutov/npm-install@v1
- run: npm run deploy:netlify -- --prod
env:
Expand Down
1 change: 1 addition & 0 deletions .husky/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx --no-install commitlint --edit $1
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npm test
6 changes: 0 additions & 6 deletions .huskyrc.json

This file was deleted.

3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ React components for the [dsmjs.com](https://dsmjs.com) site

<!--status-badges end -->


## Usage

<!--consumer-badges start -->
Expand Down Expand Up @@ -81,7 +80,7 @@ $ npm test
```

:eyes: __Note__: The verification script is executed automatically as a
[`pre-commit` hook](https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks#_committing_workflow_hooks).
[`pre-commit` hook](https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks#\_committing_workflow_hooks).
We leverage [husky](https://github.com/typicode/husky) to configure git hooks
like this automatically for you.

Expand Down
3 changes: 2 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@
"predeploy:netlify": "run-s build:storybook",
"deploy:netlify": "netlify deploy --dir=./storybook-static",
"deploy:chromatic": "npx chromatic --build-script-name=build:storybook --exit-once-uploaded",
"prepack": "run-s build"
"prepack": "run-s build",
"prepare": "husky install"
},
"config": {
"commitizen": {
Expand Down

0 comments on commit e136652

Please sign in to comment.