-
Notifications
You must be signed in to change notification settings - Fork 100
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(release tool): improve release toolchain (#225)
* chore(git hooks): install husky * chore(lint): setup commitlint * chore(commitizen): make rfd commitizen friendly * docs(commitizen): add git commit guidelines * chore(release tool): setup release-it * docs(semver): mention we use semver in the contributing guide * chore(renovate): make sure commit message follow conventional commit spec * ci(commitlint): make sure to lint commit messages
- Loading branch information
Showing
13 changed files
with
2,054 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"path": "@commitlint/cz-commitlint" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: Lint Commit Messages | ||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
commitlint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- uses: wagoid/commitlint-github-action@v4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
yarn commitlint --edit $1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
if [ "$SKIP_PREPARE_COMMIT_MSG" = "true" ]; then | ||
echo "SKIP_PREPARE_COMMIT_MSG env variable is set to 'true', skipping prepare-commit-msg" | ||
exit 0 | ||
fi | ||
|
||
exec < /dev/tty && yarn cz --hook || true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
/* eslint-disable no-template-curly-in-string */ | ||
|
||
module.exports = { | ||
git: { | ||
commitMessage: 'chore: release ${version}', | ||
tagName: 'v${version}', | ||
}, | ||
npm: { | ||
publish: true, | ||
}, | ||
github: { | ||
release: true, | ||
}, | ||
plugins: { | ||
'@release-it/conventional-changelog': { | ||
infile: 'CHANGELOG.md', | ||
preset: { | ||
name: 'conventionalcommits', | ||
types: [ | ||
{ | ||
type: 'chore', | ||
section: 'Others 🔧', | ||
hidden: false, | ||
}, | ||
{ | ||
type: 'revert', | ||
section: 'Reverts ◀', | ||
hidden: false, | ||
}, | ||
{ | ||
type: 'feat', | ||
section: 'Features 🔥', | ||
hidden: false, | ||
}, | ||
{ | ||
type: 'fix', | ||
section: 'Bug Fixes 🛠', | ||
hidden: false, | ||
}, | ||
{ | ||
type: 'improvement', | ||
section: 'Feature Improvements 🛠', | ||
hidden: false, | ||
}, | ||
{ | ||
type: 'docs', | ||
section: 'Docs 📃', | ||
hidden: false, | ||
}, | ||
{ | ||
type: 'style', | ||
section: 'Styling 🎨', | ||
hidden: false, | ||
}, | ||
{ | ||
type: 'refactor', | ||
section: 'Code Refactoring 🖌', | ||
hidden: false, | ||
}, | ||
{ | ||
type: 'perf', | ||
section: 'Performance Improvements 🏎', | ||
hidden: false, | ||
}, | ||
{ | ||
type: 'test', | ||
section: 'Tests 🧪', | ||
hidden: false, | ||
}, | ||
{ | ||
type: 'build', | ||
section: 'Build System 🏗', | ||
hidden: false, | ||
}, | ||
{ | ||
type: 'ci', | ||
section: 'CI 🛠', | ||
hidden: false, | ||
}, | ||
], | ||
}, | ||
}, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
module.exports = { extends: ['@commitlint/config-conventional'] }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.