Skip to content
This repository has been archived by the owner on Jul 6, 2022. It is now read-only.

Commit

Permalink
feat: add npm automation
Browse files Browse the repository at this point in the history
  • Loading branch information
Shivam Agrawal authored and Shivam Agrawal committed Jul 24, 2019
1 parent fdb35f4 commit bf9c97d
Show file tree
Hide file tree
Showing 5 changed files with 14,155 additions and 2 deletions.
15 changes: 15 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
language: node_js
node_js:
- '10'
before_install:
- curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.15.2
- export PATH="$HOME/.yarn/bin:$PATH"
- export NODE_OPTIONS=--max_old_space_size=4096

jobs:
include:
- stage: release
node_js: lts/*
script:
- yarn run build:ci
- npm run semantic-release
1 change: 1 addition & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = {extends: ['@commitlint/config-conventional']};
24 changes: 22 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
"build:website": "docz build",
"test": "jest --env=jsdom",
"build:typedefs": "ttsc",
"preinstall": "rm -rf node_modules/websocket/.git"
"preinstall": "rm -rf node_modules/websocket/.git",
"semantic-release": "semantic-release"
},
"resolutions": {
"react-hot-loader": "4.7.1",
Expand All @@ -37,6 +38,7 @@
"@types/styled-system": "^5.0.0",
"@types/web3": "^1.0.19",
"bignumber.js": "^8.0.1",
"commitizen": "^4.0.3",
"file-saver": "^2.0.2",
"flatpickr": "^4.5.2",
"formik": "^1.5.1",
Expand All @@ -58,6 +60,7 @@
"redux": "^4.0.4",
"redux-little-router": "^15.1.2",
"scrollbarwidth": "^0.1.3",
"semantic-release-cli": "^5.1.1",
"simplebar-react": "^0.1.4",
"styled-components": "4.1.3",
"styled-system": "^3.2.1",
Expand All @@ -77,9 +80,12 @@
"@babel/preset-env": "7.0.0",
"@babel/preset-react": "7.0.0",
"@babel/preset-typescript": "7.0.0",
"@commitlint/cli": "^8.1.0",
"@commitlint/config-conventional": "^8.1.0",
"@emotion/cache": "^10.0.0",
"@emotion/core": "^10.0.6",
"@svgr/webpack": "^4.1.0",
"@semantic-release/git": "^7.1.0-beta.3",
"@types/jest": "^23.3.10",
"@types/lodash": "^4.14.119",
"@types/moment-timezone": "^0.5.10",
Expand All @@ -96,10 +102,12 @@
"babel-core": "^7.0.0-bridge.0",
"babel-loader": "8.0.2",
"babel-plugin-named-asset-import": "^0.3.0",
"cz-conventional-changelog": "^3.0.2",
"docz": "^0.13.7",
"docz-plugin-css": "^0.11.0",
"docz-theme-default": "^0.13.7",
"emotion-theming": "^10.0.6",
"husky": "^3.0.1",
"jest": "^24.1.0",
"jest-dom": "^3.1.1",
"jest-styled-components": "^6.3.1",
Expand All @@ -108,7 +116,8 @@
"react-redux": "^6.0.1",
"react-testing-library": "^5.8.0",
"redux-little-router": "^15.1.2",
"typescript": "3.2.4"
"typescript": "3.2.4",
"semantic-release": "16.0.0-beta.18"
},
"jest": {
"moduleFileExtensions": [
Expand Down Expand Up @@ -154,5 +163,16 @@
"jest-junit",
"default"
]
},
"husky": {
"hooks": {
"pre-commit": "lint-staged",
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
}
},
"config": {
"commitizen": {
"path": "./node_modules/cz-conventional-changelog"
}
}
}
34 changes: 34 additions & 0 deletions release.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
module.exports = {
repositoryUrl: 'https://github.com/PolymathNetwork/polymath-ui.git',
branches: [
'master',
{
channel: 'beta',
type: 'prerelease',
name: 'develop',
prerelease: 'beta',
},
],
/**
* In this order the **prepare** step of @semantic-release/npm will run first
* followed by @semantic-release/git:
* - Update the package.json version and create the npm package tarball
* - Push a release commit and tag, including configurable files
*
* See:
* - https://github.com/semantic-release/semantic-release/blob/beta/docs/usage/plugins.md#plugin-ordering
* - https://github.com/semantic-release/semantic-release/blob/beta/docs/extending/plugins-list.md
*/
plugins: [
'@semantic-release/commit-analyzer',
'@semantic-release/release-notes-generator',
[
'@semantic-release/npm',
{
tarballDir: 'npm-package/',
},
],
'@semantic-release/git',
'@semantic-release/github',
],
};
Loading

0 comments on commit bf9c97d

Please sign in to comment.