Skip to content

Commit 7ffe6e3

Browse files
fix: add CI/CD with semantic-release
1 parent 1a24928 commit 7ffe6e3

File tree

8 files changed

+347
-4
lines changed

8 files changed

+347
-4
lines changed

.github/workflows/release.yml

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

.github/workflows/test.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Test
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- main
8+
9+
jobs:
10+
release:
11+
runs-on: ubuntu-latest
12+
13+
strategy:
14+
matrix:
15+
node-version: [10, 12, 14, 16]
16+
17+
steps:
18+
- uses: actions/checkout@v2
19+
- name: Use Node.js ${{ matrix.node-version }}
20+
uses: actions/setup-node@v2
21+
with:
22+
node-version: ${{ matrix.node-version }}
23+
- run: npm ci
24+
- run: npm run release

.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"

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# recursive-proxy-mock
22

3+
[![npm](https://img.shields.io/npm/v/recursive-proxy-mock)](https://www.npmjs.com/package/recursive-proxy-mock) [![npm](https://img.shields.io/npm/dm/recursive-proxy-mock)](https://www.npmjs.com/package/recursive-proxy-mock) [![NPM](https://img.shields.io/npm/l/recursive-proxy-mock)](https://github.com/CreativeTechGuy/recursive-proxy-mock/blob/main/LICENSE) [![npm type definitions](https://img.shields.io/npm/types/recursive-proxy-mock)](https://www.npmjs.com/package/recursive-proxy-mock) [![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
4+
35
> Create a proxy which can mock any object, function, class, etc. with infinite depth and combinations.
46
57
## Table of Contents

commitlint.config.js

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

cspell.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"version": "0.1",
3-
"words": ["corejs", "eqeqeq", "iife", "lcov", "ttypescript", "webgl"],
3+
"words": ["commitlint", "corejs", "eqeqeq", "iife", "lcov", "ttypescript", "webgl"],
44
"ignoreRegExpList": ["\\(#.*\\)"],
5-
"ignorePaths": ["/coverage", "/dist", "package-lock.json"]
5+
"ignorePaths": ["/coverage", "/dist", "package-lock.json", "package.json"]
66
}

package-lock.json

Lines changed: 276 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)