Skip to content

Commit 84168d1

Browse files
authored
chore(patch-release): add more release scope for semantic-release (#890)
1 parent 6e90db1 commit 84168d1

File tree

4 files changed

+46
-16
lines changed

4 files changed

+46
-16
lines changed

.releaserc.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,18 @@
5252
"type": "test",
5353
"release": false
5454
},
55+
{
56+
"scope": "*major-release*",
57+
"release": "major"
58+
},
59+
{
60+
"scope": "*minor-release*",
61+
"release": "minor"
62+
},
63+
{
64+
"scope": "*patch-release*",
65+
"release": "patch"
66+
},
5567
{
5668
"scope": "*no-release*",
5769
"release": false

docs/management/release.md

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,31 +11,34 @@ The release configuration is located in the root directory of the project:
1111

1212
Based on this configuration, the following trigger rules apply:
1313

14-
* A **major** release is triggered by a 'BREAKING CHANGE' or 'BREAKING-CHANGE' in the footer of the commit message.
15-
* A **minor** release is triggered when the latest commit type is `feat`.
16-
* A **patch** release is triggered when the latest commit type is `fix`, `perf`, `refactor` or `revert`.
17-
* No release is triggered if the latest commit type is any other type or has a `no-release` scope.
14+
* A **major** release is triggered by a 'BREAKING CHANGE' or 'BREAKING-CHANGE' in the footer or has a `major-release` scope.
15+
* A **minor** release is triggered when the commit type is `feat` or has a `minor-release` scope.
16+
* A **patch** release is triggered when the commit type is `fix`, `perf`, `refactor` or `revert` or has a `patch-release` scope.
17+
* No release is triggered if the commit type is any other type or has a `no-release` scope.
1818

1919
## Commit message examples
2020

2121
### Major release
2222

23-
```text
24-
feat: drop Python 3.8 support
23+
* ```text
24+
feat: drop Python 3.8 support
2525
26-
BREAKING CHANGE: drop Python 3.8 support
27-
```
26+
BREAKING CHANGE: drop Python 3.8 support
27+
```
28+
* `chore(major-release): a major release`
2829

2930
### Minor release
3031

3132
* `feat: add an awesome feature`
33+
* `chore(minor-release): a minor release`
3234

3335
### Patch release
3436

3537
* `fix: fix a silly bug`
3638
* `perf: performance improvement for the core`
3739
* `refactor: refactor the base module`
3840
* `revert: revert a buggy implementation`
41+
* `chore(patch-release): a patch release`
3942

4043
### No release
4144

template/.releaserc.json.jinja

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,18 @@
5252
"type": "test",
5353
"release": false
5454
},
55+
{
56+
"scope": "*major-release*",
57+
"release": "major"
58+
},
59+
{
60+
"scope": "*minor-release*",
61+
"release": "minor"
62+
},
63+
{
64+
"scope": "*patch-release*",
65+
"release": "patch"
66+
},
5567
{
5668
"scope": "*no-release*",
5769
"release": false

template/docs/management/release.md.jinja

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,31 +11,34 @@ The release configuration is located in the root directory of the project:
1111

1212
Based on this configuration, the following trigger rules apply:
1313

14-
* A **major** release is triggered by a 'BREAKING CHANGE' or 'BREAKING-CHANGE' in the footer of the commit message.
15-
* A **minor** release is triggered when the latest commit type is `feat`.
16-
* A **patch** release is triggered when the latest commit type is `fix`, `perf`, `refactor` or `revert`.
17-
* No release is triggered if the latest commit type is any other type or has a `no-release` scope.
14+
* A **major** release is triggered by a 'BREAKING CHANGE' or 'BREAKING-CHANGE' in the footer or has a `major-release` scope.
15+
* A **minor** release is triggered when the commit type is `feat` or has a `minor-release` scope.
16+
* A **patch** release is triggered when the commit type is `fix`, `perf`, `refactor` or `revert` or has a `patch-release` scope.
17+
* No release is triggered if the commit type is any other type or has a `no-release` scope.
1818

1919
## Commit message examples
2020

2121
### Major release
2222

23-
```text
24-
feat: drop Python 3.8 support
23+
* ```text
24+
feat: drop Python 3.8 support
2525

26-
BREAKING CHANGE: drop Python 3.8 support
27-
```
26+
BREAKING CHANGE: drop Python 3.8 support
27+
```
28+
* `chore(major-release): a major release`
2829

2930
### Minor release
3031

3132
* `feat: add an awesome feature`
33+
* `chore(minor-release): a minor release`
3234

3335
### Patch release
3436

3537
* `fix: fix a silly bug`
3638
* `perf: performance improvement for the core`
3739
* `refactor: refactor the base module`
3840
* `revert: revert a buggy implementation`
41+
* `chore(patch-release): a patch release`
3942

4043
### No release
4144

0 commit comments

Comments
 (0)