From 42ff3118e33c481e32d2f6bc795203ce5c4dd1e0 Mon Sep 17 00:00:00 2001 From: Gordian <68512769+Gordiancyber@users.noreply.github.com> Date: Sat, 6 Jul 2024 09:09:29 +0100 Subject: [PATCH] Adding comments to Update .releaserc.js (#494) Adding comments helps to explain the purpose of each section and plugin in your Semantic Release configuration. --- .releaserc.js | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/.releaserc.js b/.releaserc.js index bb9b62277..5b2ce2b40 100644 --- a/.releaserc.js +++ b/.releaserc.js @@ -1,29 +1,48 @@ +// Export a configuration object for Semantic Release + module.exports = { + // Define the branch to release from (e.g., "main" branch) branches: [{ name: "main" }], + + // List of plugins used for the release process plugins: [ + // Plugin to analyze commit messages following the Angular commit convention [ "@semantic-release/commit-analyzer", { - preset: "angular", + preset: "angular", // Use the Angular preset }, ], + // Plugin to generate release notes "@semantic-release/release-notes-generator", + // Plugin to update the changelog "@semantic-release/changelog", + // Plugin to commit changes to the repository [ "@semantic-release/git", { + // Specify files to commit as part of the release assets: ["CHANGELOG.md", "package.json", "yarn.lock"], + // Define the commit message format message: "chore(release): 🤖 ${nextRelease.version} [skip ci]", }, ], + // Plugin to create a GitHub release [ "@semantic-release/github", { + // Specify assets to upload with the release assets: ["CHANGELOG.md"], }, ], ], + + // Use the Angular preset for commit message parsing preset: "angular", + + // Enable CI mode (disables prompts and prevents publishing) ci: true, + + // Enable debug mode for more verbose output debug: true, };