Skip to content

Commit

Permalink
feat(semantic-release): implementing semantic-release on travis
Browse files Browse the repository at this point in the history
  • Loading branch information
Daphne Smit authored and Daphne Smit committed Mar 28, 2020
1 parent bfc64ca commit 739f598
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 24 deletions.
20 changes: 0 additions & 20 deletions .travis.yml

This file was deleted.

32 changes: 32 additions & 0 deletions .travis2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
language: node_js
node_js:
- '12'

jobs:
include:
- stage: test
name: "Run tests" # names the first Tests stage job
script:
- npm run test
- stage: before_deploy
name: "Build example"
script:
- cd example
- npm install
- npm run build
- stage: deploy
name: "Deploy to surge.sh"
deploy:
provider: surge
project: ./example/dist
domain: use-cornify.surge.sh
skip_cleanup: true
on:
branch: master
- stage: release
name: "Release to NPM"
deploy:
provider: script
skip_cleanup: true
script:
- npx 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-angular'] };
13 changes: 9 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "use-cornify",
"description": "🦄 Put unicorns and rainbows on any website on the Internet with a single React Hook!",
"version": "0.1.11",
"version": "0.0.0-development",
"license": "MIT",
"main": "dist/index.js",
"typings": "dist/index.d.ts",
Expand Down Expand Up @@ -33,18 +33,22 @@
"dist"
],
"scripts": {
"commitmsg": "npx commitlint -e $GIT_PARAMS",
"start": "tsdx watch",
"build": "tsdx build",
"test": "tsdx test --passWithNoTests",
"lint": "tsdx lint",
"prepare": "tsdx build"
"prepare": "tsdx build",
"semantic-release": "semantic-release"
},
"peerDependencies": {
"react": ">=16"
},
"husky": {
"hooks": {
"pre-commit": "tsdx lint"
"pre-commit": "tsdx lint",
"commit-msg": "npm run commitmsg",
"pre-push": "npm run test"
}
},
"dependencies": {
Expand All @@ -60,6 +64,7 @@
"react-dom": "^16.13.0",
"tsdx": "^0.12.3",
"tslib": "^1.11.1",
"typescript": "^3.8.3"
"typescript": "^3.8.3",
"semantic-release": "^17.0.4"
}
}

0 comments on commit 739f598

Please sign in to comment.