Skip to content

Commit ab3ffde

Browse files
committed
feat: bump version on change (#107)
* feat: added bump workflow * feat: tsc on precommit * feat: add tsc and lint in tests workflow * feat: add tsc and lint in tests workflow * ci: change workflow tests * ci(bump): use package script to bump
1 parent 96ef170 commit ab3ffde

File tree

5 files changed

+69
-3
lines changed

5 files changed

+69
-3
lines changed

.github/workflows/bump.yml

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Bump
2+
3+
on:
4+
push:
5+
branches: [main]
6+
7+
jobs:
8+
bump:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- run: yarn bump:patch
12+
- name: Push changes
13+
uses: ad-m/github-push-action@master
14+
with:
15+
github_token: ${{ secrets.GITHUB_TOKEN }}
16+
branch: ${{ github.ref }}
17+
tags: true

.github/workflows/tests.yml

+49-1
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,56 @@ jobs:
3333
with:
3434
name: coverage
3535
path: coverage
36+
lint:
37+
runs-on: ubuntu-latest
38+
steps:
39+
- name: Checkout
40+
uses: actions/checkout@v2
41+
42+
- name: Caches
43+
uses: actions/cache@v2
44+
id: yarn-node-module-cache
45+
with:
46+
path: node_modules
47+
key: ${{ runner.os }}-node_modules-${{ hashFiles('**/yarn.lock') }}
48+
49+
- name: Node14
50+
uses: actions/setup-node@v2
51+
with:
52+
node-version: '14'
53+
54+
- name: Install
55+
if: steps.yarn-node-module-cache.outputs.cache-hit != 'true'
56+
run: yarn install
57+
58+
- name: Eslint
59+
run: yarn lint
60+
tsc:
61+
runs-on: ubuntu-latest
62+
steps:
63+
- name: Checkout
64+
uses: actions/checkout@v2
65+
66+
- name: Caches
67+
uses: actions/cache@v2
68+
id: yarn-node-module-cache
69+
with:
70+
path: node_modules
71+
key: ${{ runner.os }}-node_modules-${{ hashFiles('**/yarn.lock') }}
72+
73+
- name: Node14
74+
uses: actions/setup-node@v2
75+
with:
76+
node-version: '14'
77+
78+
- name: Install
79+
if: steps.yarn-node-module-cache.outputs.cache-hit != 'true'
80+
run: yarn install
81+
82+
- name: Typescript
83+
run: yarn tsc
3684
build:
37-
needs: coverage
85+
needs: [coverage, tsc, lint]
3886
runs-on: ubuntu-latest
3987
steps:
4088
- name: Checkout

.husky/pre-commit

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/bin/sh
22
. "$(dirname "$0")/_/husky.sh"
33

4-
yarn lint
4+
yarn lint && yarn tsc

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
"start": "next start",
3535
"format": "prettier --write .",
3636
"lint": "eslint --fix .",
37+
"tsc": "tsc --noEmit",
3738
"test": "jest --silent",
3839
"coverage": "jest --coverage --silent",
3940
"e2e": "cypress run --headless",

tsconfig.tsbuildinfo

+1-1
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)