Skip to content

Commit

Permalink
build: add semantic release
Browse files Browse the repository at this point in the history
  • Loading branch information
amphro committed Oct 24, 2018
1 parent 222d01d commit 8977dea
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 3 deletions.
27 changes: 26 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
---
version: 2
jobs:
node-latest: &test
base: &base
docker:
- image: node:latest
working_directory: ~/cli
node-latest: &test
<<: *base
steps:
- checkout
- restore_cache: &restore_cache
Expand All @@ -30,10 +32,33 @@ jobs:
<<: *test
docker:
- image: node:8
release:
<<: *base
steps:
- checkout
- restore_cache: &restore_cache
key: dependency-cache-{{ checksum "package.json" }}
- run:
name: Install dependencies
command: .circleci/greenkeeper
- run: yarn global add semantic-release@15
- run: semantic-release
- save_cache:
key: dependency-cache-{{ checksum "package.json" }}
paths:
- ~/cli/node_modules
- /usr/local/share/.cache/yarn
- /usr/local/share/.config/yarn

workflows:
version: 2
"sfdx-core":
jobs:
- node-latest
- node-8
- release:
filters:
branches: {only: master}
requires:
- node-latest
- node-8
3 changes: 3 additions & 0 deletions .commitlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": ["@commitlint/config-conventional"]
}
21 changes: 19 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
"prepare": "npm run build",
"test": "npm run lint && nyc --reporter=lcov --reporter=text mocha \"test/**/*Test.ts\"",
"test-with-coverage": "npm run lint-report && scripts/unit-test-with-coverage.js",
"watch": "tsc -w -p tsconfig.json"
"watch": "tsc -w -p tsconfig.json",
"semantic-release": "semantic-release"
},
"keywords": [
"force",
Expand All @@ -28,6 +29,11 @@
"messages",
"!lib/**/*.map"
],
"husky": {
"hooks": {
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
}
},
"dependencies": {
"@salesforce/kit": "0.9.0",
"@salesforce/ts-types": "0.14.0",
Expand All @@ -40,6 +46,8 @@
"mkdirp": "0.5.1"
},
"devDependencies": {
"@commitlint/cli": "^7.2.1",
"@commitlint/config-conventional": "^7.1.2",
"@salesforce/ts-sinon": "0.2.2",
"@salesforce/dev-config": "1.1.4",
"@types/chai": "4.0.4",
Expand All @@ -53,9 +61,11 @@
"@types/sinon": "4.3.2",
"chai": "4.1.1",
"docdash": "0.4.0",
"husky": "^1.1.2",
"jsdoc": "3.5.5",
"mocha": "5.0.1",
"nyc": "13.0.1",
"semantic-release": "^15.10.5",
"shelljs": "0.8.1",
"sinon": "5.0.7",
"source-map-support": "^0.5.3",
Expand All @@ -64,5 +74,12 @@
"typescript": "3.0.3",
"xunit-file": "1.0.0"
},
"types": "lib/exported.d.ts"
"types": "lib/exported.d.ts",
"repository": {
"type": "git",
"url": "https://github.com/forcedotcom/sfdx-core.git"
},
"publishConfig": {
"access": "restricted"
}
}

0 comments on commit 8977dea

Please sign in to comment.