Skip to content

Commit 675d440

Browse files
authored
add semantic-release package publishing (#23)
* docs(.github/): add comments on semantic-release to PR template .md * chore(build-steps): add semantic-release package and circle.yml configs for auto npm publish
1 parent 15016e8 commit 675d440

File tree

3 files changed

+17
-5
lines changed

3 files changed

+17
-5
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
Fixes #<issue_number_goes_here> (it's a good idea to open an issue first for discussion)
22

3+
> Note: This project uses `semantic-release` to auto publish npm packages on successful builds.
4+
The commit messages must follow AngularJS Commit Msg Conventions: https://docs.google.com/document/d/1QrDFcIiPjSLDn3EL15IJygNPiHORgU1_OOAqWjiDU5Y/edit#heading=h.uyo6cb12dt6w
5+
6+
- [ ] - My commit messages follow AngularJS Commit Msg Conventions
37
- [ ] - If applicable, appropriate JSDoc comments were updated in source code
4-
- [ ] - If applicable, approprate changes to js-data.io docs have been suggested ("Suggest Edits" button)
8+
- [ ] - If applicable, appropriate changes to js-data.io docs have been suggested ("Suggest Edits" button)
9+
- [ ] - Unit test coverage did not decrease & appropriate tests changes made

circle.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ general:
44
- gh-pages
55
machine:
66
node:
7-
version: 5.7.0
7+
version: 6
88
dependencies:
99
pre:
1010
- npm install -g npm
@@ -13,3 +13,4 @@ dependencies:
1313
test:
1414
post:
1515
- nyc report --reporter=lcov | codecov
16+
- npm run semantic-release || true

package.json

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "js-data-mongodb",
33
"description": "MongoDB adapter for js-data.",
4-
"version": "1.0.0-rc.1",
4+
"version": "0.0.0-semantic-release",
55
"homepage": "https://github.com/js-data/js-data-mongodb",
66
"repository": {
77
"type": "git",
@@ -55,7 +55,11 @@
5555
"mocha": "mocha -t 20000 -R dot -r babel-core/register -r babel-polyfill mocha.start.js",
5656
"cover": "nyc --require babel-core/register --require babel-polyfill --cache mocha -t 20000 -R dot mocha.start.js && nyc report --reporter=html",
5757
"test": "npm run build && npm run cover",
58-
"release": "npm test && npm run doc && repo-tools updates && repo-tools changelog && repo-tools authors"
58+
"release": "npm test && npm run doc && repo-tools updates && repo-tools changelog && repo-tools authors",
59+
"semantic-release": "semantic-release pre && npm publish && semantic-release post"
60+
},
61+
"release": {
62+
"verifyConditions": "condition-circle"
5963
},
6064
"dependencies": {
6165
"js-data-adapter": "~0.8.2",
@@ -67,6 +71,8 @@
6771
"mongodb": ">=1.3.x"
6872
},
6973
"devDependencies": {
70-
"js-data-repo-tools": "0.5.6"
74+
"condition-circle": "^1.5.0",
75+
"js-data-repo-tools": "0.5.6",
76+
"semantic-release": "^4.3.5"
7177
}
7278
}

0 commit comments

Comments
 (0)