Skip to content

Commit d677376

Browse files
feat(config): add semantic release
1 parent 5d309d9 commit d677376

File tree

3 files changed

+23
-4
lines changed

3 files changed

+23
-4
lines changed

.circleci/config.yml

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ jobs:
99
# Download and cache dependencies
1010
- restore_cache:
1111
keys:
12-
- v1-dependencies-{{ checksum "package.json" }}
13-
# fallback to using the latest cache if no exact match is found
14-
- v1-dependencies-
12+
- v1-dependencies-{{ checksum "package.json" }}
13+
# fallback to using the latest cache if no exact match is found
14+
- v1-dependencies-
1515
- run: npm i
1616
- save_cache:
1717
paths:
@@ -24,3 +24,21 @@ jobs:
2424
- persist_to_workspace:
2525
root: ~/repo
2626
paths: .
27+
release:
28+
docker:
29+
- image: circleci/node:10.16.3
30+
steps:
31+
- checkout
32+
- run: npm install
33+
- run: npm run build
34+
- run: npx semantic-release
35+
36+
workflows:
37+
version: 2
38+
test_and_release:
39+
# Run the test jobs first, then the release only when all the test jobs are successful
40+
jobs:
41+
- build
42+
- release:
43+
requires:
44+
- build

commitlint.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
module.exports = { extends: ['@commitlint/config-conventional'] }
1+
module.exports = { extends: ['@commitlint/config-conventional'] };

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@
8484
"rollup-plugin-commonjs": "10.1.0",
8585
"rollup-plugin-node-resolve": "5.2.0",
8686
"rollup-plugin-terser": "5.1.2",
87+
"semantic-release": "^15.13.24",
8788
"yargs": "14.0.0"
8889
},
8990
"peerDependencies": {

0 commit comments

Comments
 (0)