From 5f2572ff8bb5110b53216bf08d2f457bea02af40 Mon Sep 17 00:00:00 2001 From: achingbrain Date: Sat, 8 Jan 2022 07:33:00 +0100 Subject: [PATCH] chore: add semantic release config Generate changelogs again. --- package.json | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 66 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 67a22f73..6b46d4e1 100644 --- a/package.json +++ b/package.json @@ -67,7 +67,7 @@ "rsa", "secp256k1" ], - "license": "(Apache-2.0 OR MIT)", + "license": "Apache-2.0 OR MIT", "dependencies": { "@noble/ed25519": "^1.3.3", "@noble/secp256k1": "^1.3.4", @@ -96,5 +96,69 @@ "bugs": { "url": "https://github.com/libp2p/js-libp2p-crypto/issues" }, - "homepage": "https://github.com/libp2p/js-libp2p-crypto" + "homepage": "https://github.com/libp2p/js-libp2p-crypto", + "release": { + "branches": [ + "master" + ], + "plugins": [ + [ + "@semantic-release/commit-analyzer", { + "preset": "conventionalcommits", + "releaseRules": [{ + "breaking": true, + "release": "major" + }, { + "revert": true, + "release": "patch" + }, { + "type": "feat", + "release": "minor" + }, { + "type": "fix", + "release": "patch" + }, { + "type": "chore", + "release": "patch" + }, { + "type": "docs", + "release": "patch" + }, { + "type": "test", + "release": "patch" + }, { + "scope": "no-release", + "release": false + }] + } + ], + [ + "@semantic-release/release-notes-generator", { + "preset": "conventionalcommits", + "presetConfig": { + "types": [{ + "type": "feat", + "section": "Features" + }, { + "type": "fix", + "section": "Bug Fixes" + }, { + "type": "chore", + "section": "Trivial Changes" + }, { + "type": "docs", + "section": "Trivial Changes" + }, { + "type": "test", + "section": "Tests" + }] + } + } + ], + "@semantic-release/changelog", + "@semantic-release/npm", + "@semantic-release/github", + "@semantic-release/git" + ] + } }