From 7a86fb93a251f3b1760e6c1f9e8489f868ae8a5b Mon Sep 17 00:00:00 2001 From: Conicaw Date: Wed, 5 Jul 2023 17:35:08 -0500 Subject: [PATCH] build: use semantic release Use semantic release --- .releaserc | 43 +++++++++++++++++++++++++++++++++++++++++++ package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 46 insertions(+), 3 deletions(-) create mode 100644 .releaserc diff --git a/.releaserc b/.releaserc new file mode 100644 index 0000000..df608fc --- /dev/null +++ b/.releaserc @@ -0,0 +1,43 @@ +{ + "plugins": [ + ["@semantic-release/commit-analyzer", { + "preset": "conventionalcommits", + "releaseRules": [ + { "breaking": true, "release": "major" }, + { "revert": true, "release": "patch" }, + { "type": "build", "release": "patch" }, + { "type": "docs", "release": "patch" }, + { "type": "feat", "release": "minor" }, + { "type": "fix", "release": "patch" }, + { "type": "perf", "release": "patch" }, + { "type": "refactor", "release": "patch" } + ] + }], + + ["@semantic-release/release-notes-generator", { + "preset": "conventionalcommits", + "presetConfig": { + "types": [ + { "type": "build", "section": "Build", "hidden": false }, + { "type": "chore", "section": "Chores", "hidden": false }, + { "type": "ci", "section": "CI/CD", "hidden": false }, + { "type": "docs", "section": "Docs", "hidden": false }, + { "type": "feat", "section": "Features", "hidden": false }, + { "type": "fix", "section": "Bug Fixes", "hidden": false }, + { "type": "perf", "section": "Performance", "hidden": false }, + { "type": "refactor", "section": "Refactor", "hidden": false }, + { "type": "style", "section": "Code Style", "hidden": false }, + { "type": "test", "section": "Tests", "hidden": false } + ] + } + }], + + ["@semantic-release/npm", { + "tarballDir": "package" + }], + + ["@semantic-release/github", { + "assets": "package/*.tgz" + }] + ] +} diff --git a/package-lock.json b/package-lock.json index cee9e0a..5565fab 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@ttshivers/nestjs-http-promise", - "version": "2.0.0", + "version": "0.0.0-semantically-release", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@ttshivers/nestjs-http-promise", - "version": "2.0.0", + "version": "0.0.0-semantically-release", "license": "MIT", "dependencies": { "axios": "~0.24.0", diff --git a/package.json b/package.json index 19e7a27..bd64f37 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@ttshivers/nestjs-http-promise", - "version": "2.0.0", + "version": "0.0.0-semantically-release", "keywords": [ "nestjs", "http",