Skip to content

Commit

Permalink
feat(script): add semantic-release
Browse files Browse the repository at this point in the history
  • Loading branch information
phamhongphuc committed Dec 31, 2020
1 parent be85d9a commit 002d069
Show file tree
Hide file tree
Showing 7 changed files with 3,534 additions and 85 deletions.
1 change: 1 addition & 0 deletions .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
// alphabetical order
"asynciterable",
"czrc",
"releaserc",
"tsbuildinfo"
],
"ignorePaths": [
Expand Down
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
access=public
1 change: 1 addition & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ module.exports = {
// alphabetical order
'.babelrc',
'.czrc',
'.releaserc',
'*.code-workspace',
],
options: { parser: 'json' },
Expand Down
22 changes: 22 additions & 0 deletions .releaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
[
"@semantic-release/changelog",
{ "changelogTitle": "# Typescript Library Changelog." }
],
[
"@semantic-release/exec",
{ "prepareCmd": "yarn prettier CHANGELOG.md --write" }
],
["@semantic-release/npm", { "tarballDir": "pack" }],
["@semantic-release/github", { "assets": ["pack/*.tgz"] }],
[
"@semantic-release/git",
{
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}
]
]
}
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
"**/build/**": true
},
"files.associations": {
".czrc": "json"
".czrc": "json",
".releaserc": "json"
},
"cSpell.userWords": [], // only use words from .cspell.json
"cSpell.enabled": true,
Expand Down
11 changes: 10 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@
"test:spelling": "cspell **",
"doc": "run-s doc:html && open-cli build\\docs\\index.html",
"doc:html": "typedoc src/ --exclude **/*.test.ts --target ES6 --mode file --out build/docs",
"doc:json": "typedoc src/ --exclude **/*.test.ts --target ES6 --mode file --json build/docs/typedoc.json"
"doc:json": "typedoc src/ --exclude **/*.test.ts --target ES6 --mode file --json build/docs/typedoc.json",
"release": "semantic-release",
"release:dry": "dotenv semantic-release --dry-run"
},
"engines": {
"node": ">=12"
Expand All @@ -40,9 +42,15 @@
],
"dependencies": {},
"devDependencies": {
"@semantic-release/changelog": "^5.0.1",
"@semantic-release/exec": "^5.0.0",
"@semantic-release/git": "^9.0.0",
"@semantic-release/github": "^7.1.1",
"@semantic-release/npm": "^7.0.6",
"cspell": "^4.1.5",
"cspell-dict-vi-vn": "^1.0.17",
"cz-conventional-changelog": "^3.3.0",
"dotenv-cli": "^4.0.0",
"eslint": "^7.13.0",
"eslint-config-airbnb-typescript": "^12.0.0",
"eslint-config-prettier": "^6.15.0",
Expand All @@ -56,6 +64,7 @@
"open-cli": "^6.0.1",
"prettier": "^2.1.2",
"rimraf": "^3.0.2",
"semantic-release": "^17.2.2",
"typedoc": "^0.19.2",
"typescript": "^4.0.5"
}
Expand Down
Loading

0 comments on commit 002d069

Please sign in to comment.