Skip to content

Commit

Permalink
Merge pull request #34 from screwdriver-cd/semantic
Browse files Browse the repository at this point in the history
feat: use semantic-release to publish
  • Loading branch information
tkyi committed Dec 15, 2016
2 parents 3fb51ae + 0231c0c commit 740cc57
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 5 deletions.
19 changes: 19 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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: `<type>(<scope>): <subject>`

* 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.
9 changes: 8 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -29,6 +30,12 @@
"St. John Johnson <st.john.johnson@gmail.com",
"Tiffany Kyi <tiffanykyi@gmail.com>"
],
"release": {
"debug": false,
"verifyConditions": {
"path": "./node_modules/semantic-release/src/lib/plugin-noop.js"
}
},
"devDependencies": {
"chai": "^3.5.0",
"eslint": "^3.2.2",
Expand Down
7 changes: 3 additions & 4 deletions screwdriver.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 740cc57

Please sign in to comment.