diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b226634..aa8a3cd 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -27,6 +27,25 @@ Patches for fixes, features, and improvements are accepted through pull requests 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). +## Commit message format + +We use [semantic-release](https://www.npmjs.com/package/semantic-release), which requires commit messages to be in this specific format: `(): ` + +* Types: + * feat (feature) + * fix (bug fix) + * docs (documentation) + * style (formatting, missing semi colons, …) + * refactor + * test (when adding missing tests) + * chore (maintain) +* Scope: anything that specifies the scope of the commit. Can be blank or `*` +* Subject: description of the commit. For **breaking changes** that require major version bump, add `BREAKING CHANGE` to the commit message. + +**Examples commit messages:** +* Bug fix: `fix: Remove extra space` +* Breaking change: `feat: Add addWebhook method. BREAKING CHANGE: scm plugin need to implement addWebhook method now` + ## Feature Requests 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. diff --git a/package.json b/package.json index a7d3e0d..1b3ad6d 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,8 @@ "main": "index.js", "scripts": { "pretest": "eslint .", - "test": "jenkins-mocha --recursive" + "test": "jenkins-mocha --recursive", + "semantic-release": "semantic-release pre && npm publish && semantic-release post" }, "repository": { "type": "git", @@ -29,6 +30,12 @@ "St. John Johnson " ], + "release": { + "debug": false, + "verifyConditions": { + "path": "./node_modules/semantic-release/src/lib/plugin-noop.js" + } + }, "devDependencies": { "chai": "^3.5.0", "eslint": "^3.2.2", diff --git a/screwdriver.yaml b/screwdriver.yaml index ff45229..f6902c6 100644 --- a/screwdriver.yaml +++ b/screwdriver.yaml @@ -12,11 +12,10 @@ jobs: publish: steps: - - setup-ci: git clone https://gist.github.com/3d2388b2a7ba658cdcdaffa8cd874e50.git ci - - install-ci: npm install npm-auto-version - - publish-npm: ./ci/publish.sh + - install: npm install semantic-release + - publish: npm run semantic-release secrets: # Publishing to NPM - NPM_TOKEN # Pushing tags to Git - - GIT_KEY + - GH_TOKEN