Skip to content

Commit

Permalink
feat(semantic-release): setup automated releases
Browse files Browse the repository at this point in the history
  • Loading branch information
skovy committed Oct 29, 2019
1 parent b139a5b commit d721b11
Show file tree
Hide file tree
Showing 4 changed files with 3,123 additions and 95 deletions.
30 changes: 21 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,22 @@
if: tag IS blank

language: node_js
node_js:
- stable
install:
- yarn install
script:
- yarn run check-types
- yarn test
- yarn run check-formatting
after_success: yarn run coverage
node_js: stable

jobs:
include:
- stage: test
name: "Unit tests, type checking, linting, etc."
script:
- yarn run check-types
- yarn test
- yarn commitlint-travis
- yarn build
after_success: yarn run coverage
- stage: release
name: "Release on npm"
deploy:
provider: script
skip_cleanup: true
script:
- yarn 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"] };
8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@
"scripts": {
"build": "tsc",
"test": "jest --coverage",
"preversion": "yarn test",
"version": "yarn run build",
"postversion": "git push origin master --tags",
"check-types": "yarn run build --noEmit",
"check-formatting": "./node_modules/.bin/prettier --list-different \"src/**/*.ts*\"",
"coverage": "nyc report --temp-directory=coverage --reporter=text-lcov | coveralls",
Expand All @@ -33,6 +30,9 @@
},
"homepage": "https://skovy.github.io/cooky-cutter/",
"devDependencies": {
"@commitlint/cli": "^8.2.0",
"@commitlint/config-conventional": "^8.2.0",
"@commitlint/travis-cli": "^8.2.0",
"@types/jest": "^24.0.18",
"coveralls": "^3.0.2",
"docsify-cli": "^4.3.0",
Expand All @@ -41,11 +41,13 @@
"nyc": "^14.1.1",
"prettier": "1.18.2",
"pretty-quick": "^1.6.0",
"semantic-release": "^15.13.28",
"ts-jest": "^24.0.2",
"typescript": "^3.6.3"
},
"husky": {
"hooks": {
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS",
"pre-commit": "pretty-quick --staged"
}
}
Expand Down
Loading

0 comments on commit d721b11

Please sign in to comment.