Skip to content

Commit 0cf7f19

Browse files
author
Luke Brandon Farrell
committed
fix(tooling): added release automation and pre-commit hooks
1 parent 05eaab6 commit 0cf7f19

File tree

8 files changed

+5727
-41
lines changed

8 files changed

+5727
-41
lines changed

.github/workflows/release.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
2+
name: Release
3+
on:
4+
push:
5+
branches:
6+
- master
7+
jobs:
8+
release:
9+
name: Release
10+
runs-on: ubuntu-18.04
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v1
14+
- name: Setup Node.js
15+
uses: actions/setup-node@v1
16+
with:
17+
node-version: 12
18+
- name: Install dependencies
19+
run: npm ci
20+
- name: Release
21+
env:
22+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
23+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
24+
run: npx semantic-release
25+

.husky/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
_

.husky/commit-msg

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npx --no-install commitlint --edit $1

.husky/pre-commit

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npm run pre-commit

.lintstagedrc.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
2+
{
3+
"src/**/*.{js,jsx,ts,tsx,json,css,scss,md}": [
4+
"prettier --write",
5+
"git add ."
6+
]
7+
}
8+

commitlint.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = { extends: ['@commitlint/config-conventional'] };

0 commit comments

Comments
 (0)