Skip to content

Commit 8e469e2

Browse files
committed
feat: Use semantic-release to publish
1 parent 9468ee3 commit 8e469e2

File tree

3 files changed

+30
-5
lines changed

3 files changed

+30
-5
lines changed

CONTRIBUTING.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,25 @@ Patches for fixes, features, and improvements are accepted through pull requests
2727

2828
Please ask before embarking on a large improvement so you're not disappointed if it does not align with the goals of the project or owner(s).
2929

30+
## Commit message format
31+
32+
We use [semantic-release](https://www.npmjs.com/package/semantic-release), which requires commit messages to be in this specific format: `<type>(<scope>): <subject>`
33+
34+
* Types:
35+
* feat (feature)
36+
* fix (bug fix)
37+
* docs (documentation)
38+
* style (formatting, missing semi colons, …)
39+
* refactor
40+
* test (when adding missing tests)
41+
* chore (maintain)
42+
* Scope: anything that specifies the scope of the commit. Can be blank or `*`
43+
* Subject: description of the commit. For **breaking changes** that require major version bump, add `BREAKING CHANGE` to the commit message.
44+
45+
**Examples commit messages:**
46+
* Bug fix: `fix: Remove extra space`
47+
* Breaking change: `feat(scm): Support new scm plugin. BREAKING CHANGE: github no longer works`
48+
3049
## Feature Requests
3150

3251
Make the case for a feature via an issue with a good title. The feature should be discussed and given a target inclusion milestone or closed.

package.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
"main": "index.js",
66
"scripts": {
77
"pretest": "eslint .",
8-
"test": "jenkins-mocha --recursive"
8+
"test": "jenkins-mocha --recursive",
9+
"semantic-release": "semantic-release pre && npm publish && semantic-release post"
910
},
1011
"repository": {
1112
"type": "git",
@@ -29,6 +30,12 @@
2930
"Tiffany Kyi <tiffanykyi@gmail.com>",
3031
"Min Zhang <minzhang@andrew.cmu.edu>"
3132
],
33+
"release": {
34+
"debug": false,
35+
"verifyConditions": {
36+
"path": "./node_modules/semantic-release/src/lib/plugin-noop.js"
37+
}
38+
},
3239
"devDependencies": {
3340
"chai": "^3.5.0",
3441
"eslint": "^3.4.0",

screwdriver.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,10 @@ jobs:
1212

1313
publish:
1414
steps:
15-
- setup-ci: git clone https://gist.github.com/3d2388b2a7ba658cdcdaffa8cd874e50.git ci
16-
- install-ci: npm install npm-auto-version
17-
- publish-npm: ./ci/publish.sh
15+
- install: npm install semantic-release
16+
- publish: npm run semantic-release
1817
secrets:
1918
# Publishing to NPM
2019
- NPM_TOKEN
2120
# Pushing tags to Git
22-
- GIT_KEY
21+
- GH_TOKEN

0 commit comments

Comments
 (0)