Skip to content

Commit

Permalink
chore: Add release-it for release automation 🛠
Browse files Browse the repository at this point in the history
  • Loading branch information
mrchief committed Sep 16, 2018
1 parent baec874 commit 3e41056
Show file tree
Hide file tree
Showing 4 changed files with 934 additions and 56 deletions.
17 changes: 17 additions & 0 deletions .release-it.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"increment": "conventional:angular",
"beforeChangelogCommand": "npx conventional-changelog -p angular -i CHANGELOG.md -s",
"changelogCommand": "npx conventional-changelog -p angular | tail -n +3",
"safeBump": false,
"src": {
"tagName": "v%s",
"tagAnnotation": "Release v%s",
"commitMessage": "Release v%s",
"buildCommand": "yarn build:docs",
"afterReleaseCommand": "echo Successfully released ${version} to ${dist.repo}."
},
"github": {
"release": true,
"releaseName": "Release v%s"
}
}
11 changes: 11 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,14 @@ jobs:
branches:
except:
- /^v\d+\.\d+\.\d+$/
# Define the release stage that runs semantic-release
- stage: release
if: (NOT type IN (pull_request)) AND (branch = master)
node_js: lts/*
# overwrite default `script` step to skip the tests
script: echo "Deploying to npm ..."
deploy:
provider: script
skip_cleanup: true
script:
- yarn release
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-dropdown-tree-select",
"version": "0.0.0-semantic-release",
"version": "1.12.4",
"description": "Lightweight, customizable and fast Dropdown Tree Select component for React",
"keywords": [
"react",
Expand Down Expand Up @@ -34,7 +34,8 @@
"lint:nofix": "eslint src webpack.config.js && stylelint \"src/**/*.css\"",
"format": "prettier-eslint \"src/**/*.js\" \"docs/**/*.js\" webpack.config.js",
"test": "cross-env NODE_ENV=test ava",
"test:cov": "rimraf .nyc_output && nyc npm test && nyc report --reporter=lcov "
"test:cov": "rimraf .nyc_output && nyc npm test && nyc report --reporter=lcov ",
"release": "release-it"
},
"files": [
"dist"
Expand All @@ -60,6 +61,7 @@
"babel-preset-react": "^6.24.1",
"babel-preset-stage-0": "^6.24.1",
"commitizen": "^2.9.6",
"conventional-changelog-cli": "^2.0.5",
"coveralls": "^3.0.0",
"cross-env": "^5.0.5",
"css-loader": "^0.28.0",
Expand Down Expand Up @@ -92,6 +94,7 @@
"react": "^16.0.0",
"react-dom": "^16.0.0",
"react-story": "^0.0.10",
"release-it": "^7.6.1",
"rimraf": "^2.6.1",
"sinon": "^5.0.0",
"style-loader": "^0.20.1",
Expand Down
Loading

0 comments on commit 3e41056

Please sign in to comment.