@@ -3,9 +3,55 @@ 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
8
- "@semantic-release/changelog" , // Updates CHANGELOG.md
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
+ ] ,
49
+ [
50
+ "@semantic-release/changelog" , // Updates CHANGELOG.md
51
+ {
52
+ preset : "conventionalcommits" ,
53
+ } ,
54
+ ] ,
9
55
[
10
56
{
11
57
// Hook to update pubspec.yaml
@@ -27,7 +73,7 @@ module.exports = {
27
73
"@semantic-release/git" , // Commits CHANGELOG and bumps version if needed
28
74
{
29
75
assets : [ "CHANGELOG.md" , "pubspec.yaml" ] ,
30
- message : "chore(release): ${nextRelease.version} [skip ci] " ,
76
+ message : "chore(release): ${nextRelease.version}" ,
31
77
} ,
32
78
] ,
33
79
"@semantic-release/github" , // Publishes to GitHub Releases
0 commit comments