Skip to content
This repository has been archived by the owner on Apr 17, 2020. It is now read-only.

Commit

Permalink
feat(auto): automatic release version
Browse files Browse the repository at this point in the history
  • Loading branch information
Kamontat Chantrachirathumrong committed Dec 28, 2018
1 parent 999e0f3 commit 8f59a98
Show file tree
Hide file tree
Showing 2 changed files with 92 additions and 7 deletions.
97 changes: 92 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,103 @@
},
"devDependencies": {
"apidoc": "0.17.7",
"netlify-lambda": "1.1.1"
"netlify-lambda": "1.1.1",
"@semantic-release/changelog": "3.0.1",
"@semantic-release/commit-analyzer": "6.1.0",
"@semantic-release/git": "7.0.5",
"@semantic-release/github": "5.2.6",
"@semantic-release/release-notes-generator": "7.1.4",
"semantic-release": "15.13.1"
},
"scripts": {
"dump-version": "git tag \"$(node ./scripts/dump-version.js)\"",
"start": "netlify-lambda serve src/apis",
"build": "netlify-lambda build src/apis",
"docs:compile": "mkdir docs 2>/dev/null; aglio --theme-variables slate -i src/docs/index.apib -o docs/docs.html && cp _redirects docs/_redirects",
"docs:start": "aglio --theme-variables slate -i src/docs/index.apib -o docs/docs.html -s",
"prepush": "yarn dump-version",
"push": "git push && git push --tag",
"deploy": "yarn docs:compile && yarn build && ls -la docs"
"deploy": "yarn release && yarn docs:compile && yarn build",
"release": "[[ $CONTEXT == \"production\" ]] && semantic-release --debug || echo \"not production\""
},
"release": {
"plugins": [
[
"@semantic-release/commit-analyzer",
{
"releaseRules": [
{
"type": "feat",
"scope": "core",
"release": "major"
},
{
"type": "perf",
"release": "minor"
},
{
"breaking": true,
"release": "minor"
},
{
"type": "docs",
"scope": "content",
"release": "patch"
},
{
"type": "docs",
"scope": "image",
"release": "patch"
},
{
"type": "refactor",
"release": "patch"
},
{
"type": "chore",
"scope": "deps",
"release": "patch"
}
],
"parserOpts": {
"mergePattern": "/[mM]erge (.*) #(\\d+) from (.*)$/",
"mergeCorrespondence": ["plain", "id", "source"]
}
}
],
[
"@semantic-release/release-notes-generator",
{
"parserOpts": {
"mergePattern": "/[mM]erge (.*) #(\\d+) from (.*)$/",
"mergeCorrespondence": ["plain", "id", "source"]
}
}
],
[
"@semantic-release/changelog",
{
"changelogTitle": "# APIs version"
}
],
[
"@semantic-release/npm",
{
"npmPublish": false
}
],
[
"@semantic-release/git",
{
"assets": ["CHANGELOG.md", "package.json", "yarn.lock"],
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}
],
[
"@semantic-release/github",
{
"labels": ["Bot: Semantic Release", "Type: Bug", "Status: In Review"],
"releasedLabels": ["Bot: Semantic Release", "Status: Production"]
}
]
],
"preset": "angular"
}
}
2 changes: 0 additions & 2 deletions scripts/dump-version.js

This file was deleted.

0 comments on commit 8f59a98

Please sign in to comment.