From ab9228e65b2b51c18f375c527151e4eea1f2d760 Mon Sep 17 00:00:00 2001 From: Dermot Duffy Date: Mon, 9 Dec 2024 07:37:49 -0800 Subject: [PATCH] ci: Adjust semantic release settings closer to prior releases --- package.json | 66 ++++++++++++++++++++++++++++++++++++++++++++++------ yarn.lock | 10 ++++++++ 2 files changed, 69 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index e1d690e4..467d7ff6 100644 --- a/package.json +++ b/package.json @@ -68,6 +68,7 @@ "@typescript-eslint/eslint-plugin": "^7.13.0", "@typescript-eslint/parser": "^7.13.0", "@vitest/coverage-istanbul": "^1.6.0", + "conventional-changelog-conventionalcommits": "^8.0.0", "docsify-cli": "^4.4.4", "eslint": "^8.57.0", "eslint-config-airbnb-base": "^15.0.0", @@ -92,25 +93,76 @@ }, "release": { "plugins": [ - "@semantic-release/commit-analyzer", - "@semantic-release/release-notes-generator", + [ + "@semantic-release/commit-analyzer", + { + "preset": "conventionalcommits" + } + ], + [ + "@semantic-release/release-notes-generator", + { + "preset": "conventionalcommits", + "presetConfig": { + "types": [ + { + "type": "feat", + "section": ":rocket: Features" + }, + { + "type": "fix", + "section": ":bug: Bug Fixes" + }, + { + "type": "docs", + "section": ":books: Documentation" + }, + { + "type": "test", + "section": ":rotating_light: Tests" + }, + { + "type": "ci", + "section": ":construction_worker: Continuous Integration" + }, + { + "type": "refactor", + "section": ":hammer: Code Refactoring" + }, + { + "type": "perf", + "section": ":racehorse: Performance Improvements" + }, + { + "type": "chore", + "section": ":wrench: Chores" + } + ] + } + } + ], "semantic-release-export-data", [ "@semantic-release/github", { "assets": [ { - "path": "dist/*.zip", + "path": "frigate-hass-card.zip", "label": "Zip distribution" }, { - "path": "dist/*.js", - "label": "JS distribution" + "path": "dist/*.js" } ], "draftRelease": true, - "labels": ["ci"], - "assignees": ["dermotduffy"] + "labels": [ + "ci" + ], + "assignees": [ + "dermotduffy" + ], + "successComment": ":tada: This issue has been resolved in version ${nextRelease.version} :tada:\n\nSee: [GitHub release](https://github.com/dermotduffy/frigate-hass-card/releases/tag/${nextRelease.gitTag})", + "releaseNameTemplate": "v${nextverison.name}" } ] ] diff --git a/yarn.lock b/yarn.lock index f408dcb4..7e0587c9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3528,6 +3528,15 @@ __metadata: languageName: node linkType: hard +"conventional-changelog-conventionalcommits@npm:^8.0.0": + version: 8.0.0 + resolution: "conventional-changelog-conventionalcommits@npm:8.0.0" + dependencies: + compare-func: "npm:^2.0.0" + checksum: 10c0/368ee2245094579b38e1beac110577f75d82ab341d1bc6943052d5243f8bacc9ea08222a91a595a17f5f4ccc321b926211da00dd25b43877a3c51d8218bc76f0 + languageName: node + linkType: hard + "conventional-changelog-writer@npm:^8.0.0": version: 8.0.0 resolution: "conventional-changelog-writer@npm:8.0.0" @@ -5145,6 +5154,7 @@ __metadata: "@typescript-eslint/parser": "npm:^7.13.0" "@vitest/coverage-istanbul": "npm:^1.6.0" component-emitter: "npm:^1.3.1" + conventional-changelog-conventionalcommits: "npm:^8.0.0" crypto: "npm:^1.0.1" date-fns: "npm:^3.6.0" date-fns-tz: "npm:^3.1.3"