Skip to content
This repository was archived by the owner on Dec 4, 2022. It is now read-only.

Commit e151cc3

Browse files
authored
build(npm): add semantic release (#40)
1 parent 78b8ec0 commit e151cc3

File tree

6 files changed

+3783
-359
lines changed

6 files changed

+3783
-359
lines changed

.circleci/config.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,22 @@ version: 2
22
jobs:
33
build:
44
docker:
5-
- image: circleci/node:8
5+
- image: circleci/node:10-browsers
6+
environment:
7+
JOBS: 1
68
steps:
79
- checkout
810
- run: sudo npm install -g yarn@0
11+
- run: sudo npm install -g semantic-release@15
912
- run: sudo yarn global add greenkeeper-lockfile@1
1013
- restore_cache:
1114
keys:
12-
- deps-{{ .Branch }}-{{ checksum "yarn.lock" }}
13-
- deps-
15+
- deps-{{ .Branch }}-{{ checksum "yarn.lock" }}
16+
- deps-
1417
- run: yarn
1518
- save_cache:
1619
key: deps-{{ .Branch }}-{{ checksum "yarn.lock" }}
1720
paths: 'node_modules'
1821
- run: yarn ci:before
1922
- run: yarn ci:after
23+
- run: npx semantic-release

.editorconfig

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Editor configuration, see http://editorconfig.org
2+
root = true
3+
4+
[*]
5+
charset = utf-8
6+
end_of_line = lf
7+
indent_style = space
8+
indent_size = 2
9+
insert_final_newline = true
10+
trim_trailing_whitespace = true
11+
12+
[*.md]
13+
max_line_length = 140
14+
trim_trailing_whitespace = false

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ Must be one of the following:
171171
The scope should be the name of the project affected.
172172
173173
The following is the list of supported scopes:
174-
* **atr** (*angular-tslint-rules*)
174+
* **core** (*angular-tslint-rules*)
175175
176176
There are currently a few exceptions to the "use project name" rule:
177177

commitlint.config.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
module.exports = {
2+
extends: ['@commitlint/config-conventional'],
3+
rules: {
4+
'scope-enum': [2, 'always', ['core', 'package', 'npm', 'circle', 'lint', 'packaging', 'changelog']]
5+
}
6+
};

package.json

Lines changed: 86 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,98 @@
2323
"homepage": "https://github.com/fulls1z3/angular-tslint-rules#readme",
2424
"scripts": {
2525
"ci:before": "greenkeeper-lockfile-update",
26-
"ci:after": "greenkeeper-lockfile-upload",
27-
"release": "standard-version"
26+
"ci:after": "greenkeeper-lockfile-upload"
2827
},
2928
"main": "./tslint.json",
3029
"devDependencies": {
31-
"standard-version": "^5.0.2"
30+
"@commitlint/cli": "^8.0.0",
31+
"@commitlint/config-conventional": "^8.0.0",
32+
"@semantic-release/commit-analyzer": "^6.2.0",
33+
"@semantic-release/github": "^5.4.2",
34+
"@semantic-release/npm": "^5.1.13",
35+
"@semantic-release/release-notes-generator": "^7.2.1",
36+
"husky": "^1.3.1",
37+
"semantic-release": "^15.13.18"
3238
},
3339
"peerDependencies": {
3440
"codelyzer": ">=4.5.0 <5.0.0",
3541
"tslint": ">=5.14.0"
42+
},
43+
"husky": {
44+
"hooks": {
45+
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
46+
}
47+
},
48+
"release": {
49+
"branch": "master",
50+
"plugins": [
51+
[
52+
"@semantic-release/commit-analyzer",
53+
{
54+
"preset": "angular",
55+
"releaseRules": [
56+
{
57+
"type": "build",
58+
"release": "patch"
59+
},
60+
{
61+
"type": "chore",
62+
"release": "patch"
63+
},
64+
{
65+
"type": "ci",
66+
"release": "patch"
67+
},
68+
{
69+
"type": "docs",
70+
"release": "patch"
71+
},
72+
{
73+
"type": "feat",
74+
"release": "minor"
75+
},
76+
{
77+
"type": "fix",
78+
"release": "patch"
79+
},
80+
{
81+
"type": "refactor",
82+
"release": "patch"
83+
},
84+
{
85+
"type": "style",
86+
"release": "patch"
87+
}
88+
],
89+
"parserOpts": {
90+
"noteKeywords": [
91+
"BREAKING CHANGE",
92+
"BREAKING CHANGES",
93+
"BREAKING"
94+
]
95+
}
96+
}
97+
],
98+
"@semantic-release/github",
99+
[
100+
"@semantic-release/npm",
101+
{
102+
"pkgRoot": "."
103+
}
104+
],
105+
[
106+
"@semantic-release/release-notes-generator",
107+
{
108+
"preset": "angular",
109+
"parserOpts": {
110+
"noteKeywords": [
111+
"BREAKING CHANGE",
112+
"BREAKING CHANGES",
113+
"BREAKING"
114+
]
115+
}
116+
}
117+
]
118+
]
36119
}
37120
}

0 commit comments

Comments
 (0)