Skip to content

Commit

Permalink
ci: support fully automated version management and package publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
nodece committed Dec 15, 2019
1 parent fc0ef9a commit d84e343
Show file tree
Hide file tree
Showing 4 changed files with 3,389 additions and 75 deletions.
16 changes: 16 additions & 0 deletions .releaserc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"debug": true,
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/npm",
[
"@semantic-release/git",
{
"assets": ["package.json"],
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}
],
"@semantic-release/github"
]
}
13 changes: 10 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@ script:

jobs:
include:
- stage: Produce Coverage
node_js: node
script: jest --coverage && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage
- stage: Produce Coverage
node_js: node
script: jest --coverage && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage
- stage: release
node_js: lts/*
deploy:
provider: script
skip_cleanup: true
script:
- yarn semantic-release
17 changes: 13 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "casbin",
"version": "3.0.8",
"version": "0.0.0-development",

This comment has been minimized.

Copy link
@hsluoyz

hsluoyz Dec 15, 2019

Member

@nodece is this correct?

"description": "An authorization library that supports access control models like ACL, RBAC, ABAC in Node.JS",
"main": "lib/index.js",
"typings": "lib/index.d.ts",
Expand All @@ -9,16 +9,21 @@
"postpack": "rimraf lib",
"build": "rimraf lib && tsc",
"test": "jest",
"lint": "eslint . --ext .js,.ts"
"lint": "eslint . --ext .js,.ts",
"semantic-release": "semantic-release",
"commit": "git-cz"
},
"devDependencies": {
"@semantic-release/changelog": "^3.0.6",
"@semantic-release/git": "^7.0.18",
"@types/ip": "^0.0.31",
"@types/jest": "^24.0.11",
"@types/lodash": "^4.14.113",
"@types/node": "^10.5.3",
"@typescript-eslint/eslint-plugin": "^2.6.1",
"@typescript-eslint/parser": "^2.6.1",
"coveralls": "^3.0.2",
"cz-conventional-changelog": "3.0.2",
"eslint": "^6.6.0",
"eslint-config-prettier": "^6.5.0",
"eslint-plugin-prettier": "^3.1.1",
Expand All @@ -28,6 +33,7 @@
"prettier": "^1.19.1",
"pretty-quick": "^2.0.1",
"rimraf": "^2.6.2",
"semantic-release": "^15.13.31",
"ts-jest": "^24.0.0",
"tslint": "^5.11.0",
"typescript": "^3.7.2"
Expand All @@ -54,10 +60,13 @@
],
"husky": {
"hooks": {
"prepare-commit-msg": "exec < /dev/tty && git cz --hook || true",
"pre-commit": "yarn lint && pretty-quick --staged"
}
},
"publishConfig": {
"registry": "https://registry.yarnpkg.com"
"config": {
"commitizen": {
"path": "./node_modules/cz-conventional-changelog"
}
}
}
Loading

0 comments on commit d84e343

Please sign in to comment.