@@ -3,8 +3,49 @@ const fs = require("fs");
3
3
module . exports = {
4
4
branches : [ "main" ] ,
5
5
plugins : [
6
- "@semantic-release/commit-analyzer" , // Detects the release type (major, minor, patch)
7
- "@semantic-release/release-notes-generator" , // Generates release notes
6
+ [
7
+ "@semantic-release/commit-analyzer" , // Detects the release type (major, minor, patch)
8
+ {
9
+ preset : "conventionalcommits" ,
10
+ releaseRules : [
11
+ // Ignore merge commits
12
+ { subject : "*Merge pull request*" , release : false } ,
13
+ { subject : "*Merge branch*" , release : false } ,
14
+ // Ignore chore commits (they won't trigger releases)
15
+ { type : "chore" , release : false } ,
16
+ // You can also ignore other types if needed
17
+ { type : "docs" , release : false } ,
18
+ { type : "style" , release : false } ,
19
+ { type : "refactor" , release : false } ,
20
+ { type : "test" , release : false } ,
21
+ // Standard rules for releases
22
+ { type : "feat" , release : "minor" } ,
23
+ { type : "fix" , release : "patch" } ,
24
+ { type : "perf" , release : "patch" } ,
25
+ // Breaking changes always trigger major
26
+ { breaking : true , release : "major" } ,
27
+ ] ,
28
+ } ,
29
+ ] ,
30
+ [
31
+ "@semantic-release/release-notes-generator" , // Generates release notes,
32
+ {
33
+ preset : "conventionalcommits" ,
34
+ presetConfig : {
35
+ types : [
36
+ { type : "feat" , section : "Features" } ,
37
+ { type : "fix" , section : "Bug Fixes" } ,
38
+ { type : "perf" , section : "Performance Improvements" } ,
39
+ // Exclude chore from release notes
40
+ { type : "chore" , hidden : true } ,
41
+ { type : "docs" , hidden : true } ,
42
+ { type : "style" , hidden : true } ,
43
+ { type : "refactor" , hidden : true } ,
44
+ { type : "test" , hidden : true } ,
45
+ ] ,
46
+ } ,
47
+ } ,
48
+ ] ,
8
49
"@semantic-release/changelog" , // Updates CHANGELOG.md
9
50
[
10
51
{
0 commit comments