diff --git a/cspell.json b/cspell.json index f4b9a02..4b2a3ff 100644 --- a/cspell.json +++ b/cspell.json @@ -5,6 +5,7 @@ "CODEOWNERS", "commitlint", "commitlintplugin", + "conventionalcommits", "nvmrc", "OIDC", "postbuild", diff --git a/package.json b/package.json index fdb16d3..9e2adf1 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ "author": "Eric King (https://webdeveric.com/)", "repository": { "type": "git", - "url": "git+https://github.com/webdeveric/commitlint-plugin-cspell.git" + "url": "git+ssh://git@github.com/webdeveric/commitlint-plugin-cspell.git" }, "bugs": { "url": "https://github.com/webdeveric/commitlint-plugin-cspell/issues" @@ -57,6 +57,7 @@ "@vitest/coverage-v8": "^3.1.3", "@webdeveric/eslint-config-ts": "^0.11.0", "@webdeveric/prettier-config": "^0.3.0", + "conventional-changelog-conventionalcommits": "^8.0.0", "cspell": "^9.0.0", "eslint": "^8.57.1", "eslint-config-prettier": "^10.1.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9372428..8a074fc 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -30,6 +30,9 @@ importers: '@webdeveric/prettier-config': specifier: ^0.3.0 version: 0.3.0(prettier@3.5.3) + conventional-changelog-conventionalcommits: + specifier: ^8.0.0 + version: 8.0.0 cspell: specifier: ^9.0.0 version: 9.0.0 @@ -1391,6 +1394,10 @@ packages: resolution: {integrity: sha512-CLf+zr6St0wIxos4bmaKHRXWAcsCXrJU6F4VdNDrGRK3B8LDLKoX3zuMV5GhtbGkVR/LohZ6MT6im43vZLSjmA==} engines: {node: '>=18'} + conventional-changelog-conventionalcommits@8.0.0: + resolution: {integrity: sha512-eOvlTO6OcySPyyyk8pKz2dP4jjElYunj9hn9/s0OB+gapTO8zwS9UQWrZ1pmF2hFs3vw1xhonOLGcGjy/zgsuA==} + engines: {node: '>=18'} + conventional-changelog-writer@8.0.1: resolution: {integrity: sha512-hlqcy3xHred2gyYg/zXSMXraY2mjAYYo0msUCpK+BGyaVJMFCKWVXPIHiaacGO2GGp13kvHWXFhYmxT4QQqW3Q==} engines: {node: '>=18'} @@ -5102,6 +5109,10 @@ snapshots: dependencies: compare-func: 2.0.0 + conventional-changelog-conventionalcommits@8.0.0: + dependencies: + compare-func: 2.0.0 + conventional-changelog-writer@8.0.1: dependencies: conventional-commits-filter: 5.0.0 diff --git a/release.config.mjs b/release.config.mjs index 050a3b7..624ed7a 100644 --- a/release.config.mjs +++ b/release.config.mjs @@ -3,4 +3,40 @@ */ export default { branches: ['main'], + preset: 'conventionalcommits', + plugins: [ + [ + '@semantic-release/commit-analyzer', + { + releaseRules: [ + { + type: 'chore', + scope: 'deps', + release: 'minor', + }, + { + type: 'chore', + scope: 'deps-dev', + release: false, + }, + { + type: 'docs', + release: 'patch', + }, + { + type: 'refactor', + release: 'patch', + }, + { + type: 'chore', + scope: 'spelling', + release: 'patch', + }, + ], + }, + ], + '@semantic-release/release-notes-generator', + '@semantic-release/npm', + '@semantic-release/github', + ], };