Skip to content

Commit 77fc62e

Browse files
committed
chore: Set up semantic-release
1 parent 63626a1 commit 77fc62e

File tree

2 files changed

+44
-4
lines changed

2 files changed

+44
-4
lines changed

.travis.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
sudo: false
2+
language: node_js
3+
cache:
4+
directories:
5+
- node_modules
6+
notifications:
7+
email: false
8+
node_js:
9+
- '6'
10+
before_install:
11+
- npm i -g npm@^2.0.0
12+
before_script:
13+
- npm prune
14+
after_success:
15+
- npm run semantic-release
16+
branches:
17+
except:
18+
- /^v\d+\.\d+\.\d+$/

package.json

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,31 @@
11
{
22
"name": "deploy-to-git",
3-
"version": "0.0.3",
3+
"version": "0.0.0-auto",
44
"description": "Automatically deploy build artifacts to a Git repository",
55
"bin": "index.js",
66
"scripts": {
7-
"test": "echo \"Error: no test specified\" && exit 1"
7+
"test": "echo \"Error: no test specified\" && exit 1",
8+
"semantic-release": "semantic-release pre && npm publish && semantic-release post"
9+
},
10+
"config": {
11+
"validate-commit-msg": {
12+
"types": [
13+
"feat",
14+
"fix",
15+
"refactor",
16+
"perf",
17+
"test",
18+
"chore",
19+
"revert"
20+
]
21+
},
22+
"ghooks": {
23+
"commit-msg": "validate-commit-msg"
24+
}
825
},
926
"repository": {
1027
"type": "git",
11-
"url": "git+https://github.com/finom/deploy-to-git.git"
28+
"url": "https://github.com/finom/deploy-to-git.git"
1229
},
1330
"keywords": [
1431
"CI",
@@ -24,5 +41,10 @@
2441
"bugs": {
2542
"url": "https://github.com/finom/deploy-to-git/issues"
2643
},
27-
"homepage": "https://github.com/finom/deploy-to-git#readme"
44+
"homepage": "https://github.com/finom/deploy-to-git#readme",
45+
"devDependencies": {
46+
"ghooks": "^1.3.2",
47+
"semantic-release": "^4.3.5",
48+
"validate-commit-msg": "^2.8.0"
49+
}
2850
}

0 commit comments

Comments
 (0)