Skip to content

Commit 4231f13

Browse files
committed
chore(deps): add semantic-release
1 parent 7a7e7c5 commit 4231f13

File tree

2 files changed

+77
-1
lines changed

2 files changed

+77
-1
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+
name: Release
2+
on:
3+
push:
4+
branches:
5+
- master
6+
jobs:
7+
release:
8+
name: Release
9+
runs-on: ubuntu-18.04
10+
steps:
11+
- name: Checkout
12+
uses: actions/checkout@v2
13+
with:
14+
fetch-depth: 0
15+
- name: Setup Node.js
16+
uses: actions/setup-node@v1
17+
with:
18+
node-version: 12
19+
- name: Install dependencies
20+
run: yarn install --frozen-lockfile --non-interactive
21+
- name: Release
22+
env:
23+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
25+
run: npx semantic-release

package.json

Lines changed: 52 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
"build": "rollup -c",
2323
"dry-run": "npm publish --dry-run",
2424
"prepare": "npm run build",
25+
"semantic-release": "semantic-release",
2526
"test": "mocha tests/test**.*js -u tdd --experimental-json-modules"
2627
},
2728
"type": "module",
@@ -52,13 +53,63 @@
5253
"msgpackr-extract": "^1.0.14"
5354
},
5455
"devDependencies": {
56+
"@commitlint/cli": "^8.3.5",
5557
"@rollup/plugin-json": "^4.1.0",
58+
"@commitlint/config-conventional": "^8.3.4",
59+
"@semantic-release/changelog": "^5.0.1",
60+
"@semantic-release/commit-analyzer": "^8.0.1",
61+
"@semantic-release/exec": "^5.0.0",
62+
"@semantic-release/git": "^9.0.1",
63+
"@semantic-release/github": "^7.2.0",
64+
"@semantic-release/npm": "^7.0.9",
65+
"@semantic-release/release-notes-generator": "^9.0.3",
5666
"@types/node": "latest",
5767
"async": "^3",
5868
"chai": "^4.3.4",
69+
"commitizen": "^4.2.4",
5970
"esm": "^3.2.25",
71+
"husky": "^3.1.0",
6072
"mocha": "^8.1.3",
6173
"rollup": "^1.20.3",
62-
"rollup-plugin-babel-minify": "^9.0.0"
74+
"rollup-plugin-babel-minify": "^9.0.0",
75+
"semantic-release": "^17.4.7"
76+
},
77+
"config": {
78+
"commitizen": {
79+
"path": "node_modules/cz-conventional-changelog"
80+
}
81+
},
82+
"commitlint": {
83+
"extends": [
84+
"@commitlint/config-conventional"
85+
]
86+
},
87+
"husky": {
88+
"hooks": {
89+
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
90+
}
91+
},
92+
"release": {
93+
"plugins": [
94+
"@semantic-release/commit-analyzer",
95+
"@semantic-release/release-notes-generator",
96+
"@semantic-release/changelog",
97+
[
98+
"@semantic-release/npm",
99+
{
100+
"npmPublish": true
101+
}
102+
],
103+
"@semantic-release/github",
104+
[
105+
"@semantic-release/git",
106+
{
107+
"assets": [
108+
"package.json"
109+
],
110+
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
111+
}
112+
]
113+
]
63114
}
64115
}

0 commit comments

Comments
 (0)