Skip to content
This repository was archived by the owner on Dec 28, 2023. It is now read-only.

Commit 5a5b6d5

Browse files
committedApr 7, 2020
feat(ci): enable semanitic-release
Lint commits by husky. Add package-lock.json
1 parent 36404cf commit 5a5b6d5

5 files changed

+13045
-1
lines changed
 

‎.travis.yml

+12
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,19 @@ before_install:
1212

1313
before_script:
1414
- npm install -g grunt-cli
15+
- echo "TRAVIS_COMMIT $TRAVIS_COMMIT"
16+
- echo "TRAVIS_PULL_REQUEST_SHA $TRAVIS_PULL_REQUEST_SHA"
17+
- COMMIT_TO_VALIDATE=${TRAVIS_PULL_REQUEST_SHA:-$TRAVIS_COMMIT}
18+
- echo "COMMIT_TO_VALIDATE $COMMIT_TO_VALIDATE"
19+
- 'if [ "$VALIDATE_COMMIT_MSG" == "true" ]; then ./scripts/validate-commit-msg.sh $COMMIT_TO_VALIDATE; fi'
1520

1621
script:
1722
- npm run test:lib
1823
- grunt
24+
25+
after_success:
26+
# run automated release process with semantic-release
27+
- echo "TRAVIS_BRANCH=$TRAVIS_BRANCH, TRAVIS_EVENT_TYPE=$TRAVIS_EVENT_TYPE, TRAVIS_NODE_VERSION=$TRAVIS_NODE_VERSION"
28+
- if [[ "$TRAVIS_BRANCH" == "master" && "$TRAVIS_EVENT_TYPE" == "push" && "$TRAVIS_NODE_VERSION" == "12" ]]; then
29+
npm run semantic-release;
30+
fi;

‎commitlint.config.js

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = {extends: ['@commitlint/config-conventional']}

‎package-lock.json

+12,999
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json

+12-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,18 @@
4747
"mocha": "^3.0.0",
4848
"mock-fs": "^4.10.1",
4949
"shared-karma-files": "git://github.com/karma-runner/shared-karma-files.git#82ae8d02",
50-
"sinon": "^1.17.2"
50+
"sinon": "^1.17.2",
51+
"@semantic-release/changelog": "^3.0.6",
52+
"@semantic-release/git": "^7.0.18",
53+
"semantic-release": "^15.14.0",
54+
"@commitlint/cli": "^8.3.4",
55+
"@commitlint/config-conventional": "^8.3.4",
56+
"husky": "^4.0.3"
57+
},
58+
"husky": {
59+
"hooks": {
60+
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
61+
}
5162
},
5263
"license": "MIT",
5364
"contributors": [

‎release.config.js

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
module.exports = {
2+
debug: true,
3+
branch: 'master',
4+
verifyConditions: [
5+
'@semantic-release/changelog',
6+
'@semantic-release/npm',
7+
'@semantic-release/github'
8+
],
9+
prepare: [
10+
'@semantic-release/changelog',
11+
'@semantic-release/npm',
12+
'@semantic-release/git'
13+
],
14+
publish: [
15+
'@semantic-release/npm',
16+
'@semantic-release/github'
17+
],
18+
success: [
19+
'@semantic-release/github'
20+
]
21+
}

0 commit comments

Comments
 (0)
This repository has been archived.