Skip to content

Commit b5fa254

Browse files
committed
chore: add semantic release
1 parent 0218206 commit b5fa254

File tree

6 files changed

+4641
-125
lines changed

6 files changed

+4641
-125
lines changed

.circleci/config.yml

-40
This file was deleted.

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
.DS_Store
22
node_modules
3+
dist
34

45
# Log files
56
*.log

.releaserc.yml

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
verifyConditions:
2+
- "@semantic-release/changelog"
3+
- "@semantic-release/npm"
4+
- "@semantic-release/github"
5+
- "@semantic-release/git"
6+
7+
prepare:
8+
- "@semantic-release/changelog"
9+
- "@semantic-release/npm"
10+
-
11+
path: "@semantic-release/git"
12+
assets":
13+
- "package.json"
14+
- "dist"
15+
message: "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
16+
17+
publish:
18+
- "@semantic-release/npm"
19+
-
20+
path: "@semantic-release/github"
21+
assets:
22+
- path: "dist"
23+
- label: "vue-json-form distribution"
24+
25+
success:
26+
- "@semantic-release/github"
27+
28+
fail:
29+
- "@semantic-release/github"

.travis.yml

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
language: node_js
2+
cache: yarn
3+
notifications:
4+
email: false
5+
node_js:
6+
- '8'
7+
8+
script:
9+
- nyc --reporter=lcov yarn run unit
10+
11+
jobs:
12+
include:
13+
- stage: test
14+
before_script:
15+
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
16+
- chmod +x ./cc-test-reporter
17+
- ./cc-test-reporter before-build
18+
script:
19+
- yarn lint -f ./node_modules/eslint-junit/index.js
20+
- yarn test
21+
after_script:
22+
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
23+
24+
- stage: release
25+
if: branch = master
26+
script: yarn travis-deploy-once "yarn semantic-release"

package.json

+21-8
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,30 @@
11
{
22
"name": "vue-form-json",
3-
"version": "0.1.3",
3+
"version": "0.0.0-development",
44
"description": "Generate a vue form with validation and bulma style, from json",
55
"author": "14nrv",
66
"license": "MIT",
77
"scripts": {
88
"serve": "vue-cli-service serve --open",
9-
"build": "vue-cli-service build",
10-
"prepare": "vue-cli-service build --target lib --name vue-form-json ./src/components/Form/Form.vue",
9+
"prepare": "yarn build",
10+
"build": "vue-cli-service build --target lib --name vue-form-json ./src/components/Form/Form.vue",
1111
"lint": "vue-cli-service lint",
1212
"test": "NODE_ENV=test vue-cli-service test:unit --coverage",
1313
"test:tdd": "NODE_ENV=test vue-cli-service test:unit --coverage --watchAll",
14-
"release:major": "npm version major && git push --follow-tags && npm publish",
15-
"release:minor": "npm version minor && git push --follow-tags && npm publish",
16-
"release:patch": "npm version patch && git push --follow-tags && npm publish"
14+
"travis-deploy-once": "travis-deploy-once",
15+
"semantic-release": "semantic-release"
1716
},
1817
"husky": {
1918
"hooks": {
20-
"pre-commit": "lint-staged && yarn test"
19+
"pre-commit": "lint-staged && yarn test",
20+
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
2121
}
2222
},
23+
"commitlint": {
24+
"extends": [
25+
"@commitlint/config-conventional"
26+
]
27+
},
2328
"lint-staged": {
2429
"linters": {
2530
"*.{js,vue}": "vue-cli-service lint"
@@ -46,7 +51,7 @@
4651
],
4752
"repository": {
4853
"type": "git",
49-
"url": "git+https://github.com/14nrv/vue-form-json.git"
54+
"url": "https://github.com/14nrv/vue-form-json.git"
5055
},
5156
"bugs": {
5257
"url": "https://github.com/14nrv/vue-form-json/issues"
@@ -63,6 +68,12 @@
6368
"vue": "^2.5.17"
6469
},
6570
"devDependencies": {
71+
"@commitlint/cli": "^7.1.2",
72+
"@commitlint/config-conventional": "^7.1.2",
73+
"@semantic-release/changelog": "^3.0.0",
74+
"@semantic-release/git": "^7.0.4",
75+
"@semantic-release/github": "^5.0.5",
76+
"@semantic-release/npm": "^5.0.4",
6677
"@vue/cli-plugin-babel": "^3.0.1",
6778
"@vue/cli-plugin-eslint": "^3.0.1",
6879
"@vue/cli-plugin-unit-jest": "^3.0.1",
@@ -78,7 +89,9 @@
7889
"lint-staged": "^7.2.2",
7990
"mwangaben-vthelpers": "^1.2.3",
8091
"pug-plain-loader": "^1.0.0",
92+
"semantic-release": "^15.9.16",
8193
"stylus-loader": "^3.0.2",
94+
"travis-deploy-once": "^5.0.9",
8295
"vue-template-compiler": "^2.5.17"
8396
},
8497
"jest-junit": {

0 commit comments

Comments
 (0)