From b9bc1fc56619cd6c767f08e736224215e06f36b4 Mon Sep 17 00:00:00 2001 From: Alexander Jaeger Date: Tue, 8 May 2018 09:36:15 +0200 Subject: [PATCH] chore: semantic versioning/release --- .circleci/config.yml | 36 ++++++++++++++++++++++++++++++++++++ package.json | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 68 insertions(+) create mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000..ef80a59 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,36 @@ +--- +version: 2 +jobs: + + build: + machine: + enabled: true + + working_directory: ~/ansible-lint-rules + + release: + docker: + - image: circleci/node:8 + + steps: + - checkout: + path: ~/ansible-lint-rules + + - restore_cache: + keys: + - v1-dependencies-node-{{ checksum "package.json" }} + + - run: + name: "Install node dependencies" + command: | + npm install + + - save_cache: + paths: + - node_modules + key: v1-dependencies-node-{{ checksum "package.json" }} + + - run: + name: "Release role" + command: | + ./node_modules/.bin/semantic-release diff --git a/package.json b/package.json index 9e969c9..09c0bd8 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,39 @@ "test": "echo \"Error: no test specified\" && exit 1" }, "dependencies": {}, + "release": { + "tagFormat": "${version}", + "verifyConditions": [ + "@semantic-release/npm" + ], + "publish": [ + { + "path": "@semantic-release/github" + }, + { + "path": "@semantic-release/npm" + } + ], + "analyzeCommits": { + "parserOpts": { + "noteKeywords": [ + "BREAKING CHANGE", + "BREAKING CHANGES", + "BREAKING" + ] + } + } + }, + "commitlint": { + "extends": [ + "./node_modules/@commitlint/config-conventional" + ] + }, "devDependencies": { + "@commitlint/cli": "^6.1.2", + "@commitlint/config-conventional": "^6.1.2", + "@semantic-release/exec": "^2.0.1", + "semantic-release": "^13.4.1", "nodemon": "^1.17.1" }, "engines": {