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

Commit

Permalink
build(npm): add semantic release (#40)
Browse files Browse the repository at this point in the history
  • Loading branch information
fulls1z3 authored Jul 4, 2019
1 parent 78b8ec0 commit e151cc3
Show file tree
Hide file tree
Showing 6 changed files with 3,783 additions and 359 deletions.
10 changes: 7 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,22 @@ version: 2
jobs:
build:
docker:
- image: circleci/node:8
- image: circleci/node:10-browsers
environment:
JOBS: 1
steps:
- checkout
- run: sudo npm install -g yarn@0
- run: sudo npm install -g semantic-release@15
- run: sudo yarn global add greenkeeper-lockfile@1
- restore_cache:
keys:
- deps-{{ .Branch }}-{{ checksum "yarn.lock" }}
- deps-
- deps-{{ .Branch }}-{{ checksum "yarn.lock" }}
- deps-
- run: yarn
- save_cache:
key: deps-{{ .Branch }}-{{ checksum "yarn.lock" }}
paths: 'node_modules'
- run: yarn ci:before
- run: yarn ci:after
- run: npx semantic-release
14 changes: 14 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Editor configuration, see http://editorconfig.org
root = true

[*]
charset = utf-8
end_of_line = lf
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
max_line_length = 140
trim_trailing_whitespace = false
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ Must be one of the following:
The scope should be the name of the project affected.
The following is the list of supported scopes:
* **atr** (*angular-tslint-rules*)
* **core** (*angular-tslint-rules*)
There are currently a few exceptions to the "use project name" rule:
Expand Down
6 changes: 6 additions & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
extends: ['@commitlint/config-conventional'],
rules: {
'scope-enum': [2, 'always', ['core', 'package', 'npm', 'circle', 'lint', 'packaging', 'changelog']]
}
};
89 changes: 86 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,98 @@
"homepage": "https://github.com/fulls1z3/angular-tslint-rules#readme",
"scripts": {
"ci:before": "greenkeeper-lockfile-update",
"ci:after": "greenkeeper-lockfile-upload",
"release": "standard-version"
"ci:after": "greenkeeper-lockfile-upload"
},
"main": "./tslint.json",
"devDependencies": {
"standard-version": "^5.0.2"
"@commitlint/cli": "^8.0.0",
"@commitlint/config-conventional": "^8.0.0",
"@semantic-release/commit-analyzer": "^6.2.0",
"@semantic-release/github": "^5.4.2",
"@semantic-release/npm": "^5.1.13",
"@semantic-release/release-notes-generator": "^7.2.1",
"husky": "^1.3.1",
"semantic-release": "^15.13.18"
},
"peerDependencies": {
"codelyzer": ">=4.5.0 <5.0.0",
"tslint": ">=5.14.0"
},
"husky": {
"hooks": {
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
}
},
"release": {
"branch": "master",
"plugins": [
[
"@semantic-release/commit-analyzer",
{
"preset": "angular",
"releaseRules": [
{
"type": "build",
"release": "patch"
},
{
"type": "chore",
"release": "patch"
},
{
"type": "ci",
"release": "patch"
},
{
"type": "docs",
"release": "patch"
},
{
"type": "feat",
"release": "minor"
},
{
"type": "fix",
"release": "patch"
},
{
"type": "refactor",
"release": "patch"
},
{
"type": "style",
"release": "patch"
}
],
"parserOpts": {
"noteKeywords": [
"BREAKING CHANGE",
"BREAKING CHANGES",
"BREAKING"
]
}
}
],
"@semantic-release/github",
[
"@semantic-release/npm",
{
"pkgRoot": "."
}
],
[
"@semantic-release/release-notes-generator",
{
"preset": "angular",
"parserOpts": {
"noteKeywords": [
"BREAKING CHANGE",
"BREAKING CHANGES",
"BREAKING"
]
}
}
]
]
}
}
Loading

0 comments on commit e151cc3

Please sign in to comment.