@anolilab/semantic-release-preset 4.0.0 → 4.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/README.md +99 -48
- package/config/with-npm.json +17 -1
- package/config/without-npm.json +17 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## @anolilab/semantic-release-preset [4.0.1](https://github.com/anolilab/javascript-style-guide/compare/@anolilab/semantic-release-preset@4.0.0...@anolilab/semantic-release-preset@4.0.1) (2023-06-23)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* added missing presetConfig to @semantic-release/release-notes-generator ([f39883d](https://github.com/anolilab/javascript-style-guide/commit/f39883df22a9980698ed5822d8be81c9bf5fb778))
|
|
7
|
+
|
|
1
8
|
## @anolilab/semantic-release-preset [4.0.0](https://github.com/anolilab/javascript-style-guide/compare/@anolilab/semantic-release-preset@3.1.3...@anolilab/semantic-release-preset@4.0.0) (2023-06-23)
|
|
2
9
|
|
|
3
10
|
|
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<div align="center">
|
|
2
2
|
<h1>Shareable semantic-release configuration</h1>
|
|
3
3
|
|
|
4
|
-
A shareable [semantic-release](https://github.com/semantic-release/semantic-release) configuration, for enforcing consistent
|
|
4
|
+
A shareable [semantic-release](https://github.com/semantic-release/semantic-release) configuration, for enforcing consistent GitHub/NPM releases in your projects.
|
|
5
5
|
|
|
6
6
|
[![npm-image]][npm-url] [![license-image]][license-url]
|
|
7
7
|
|
|
@@ -21,7 +21,7 @@ A shareable [semantic-release](https://github.com/semantic-release/semantic-rele
|
|
|
21
21
|
|
|
22
22
|
## Purpose
|
|
23
23
|
|
|
24
|
-
-
|
|
24
|
+
- This configuration also includes a semantic-release configuration, which enables automated GitHub/NPM releases based on your commit messages.
|
|
25
25
|
|
|
26
26
|
## Install
|
|
27
27
|
|
|
@@ -41,13 +41,13 @@ pnpm add -D semantic-release @anolilab/semantic-release-preset
|
|
|
41
41
|
|
|
42
42
|
We use the following plugins within the Semantic Release ecosystem:
|
|
43
43
|
|
|
44
|
-
-
|
|
45
|
-
-
|
|
46
|
-
-
|
|
47
|
-
-
|
|
48
|
-
-
|
|
49
|
-
-
|
|
50
|
-
-
|
|
44
|
+
- [@semantic-release/changelog][3]
|
|
45
|
+
- [@semantic-release/commit-analyzer][1]
|
|
46
|
+
- [@semantic-release/exec][5]
|
|
47
|
+
- [@semantic-release/git][6]
|
|
48
|
+
- [@semantic-release/github][4]
|
|
49
|
+
- [@semantic-release/npm][7] (optional)
|
|
50
|
+
- [@semantic-release/release-notes-generator][2]
|
|
51
51
|
|
|
52
52
|
## Summary
|
|
53
53
|
|
|
@@ -73,7 +73,7 @@ With npm:
|
|
|
73
73
|
|
|
74
74
|
```json
|
|
75
75
|
{
|
|
76
|
-
|
|
76
|
+
"extends": "@anolilab/semantic-release-preset/npm"
|
|
77
77
|
}
|
|
78
78
|
```
|
|
79
79
|
|
|
@@ -81,70 +81,123 @@ Without npm:
|
|
|
81
81
|
|
|
82
82
|
```json
|
|
83
83
|
{
|
|
84
|
-
|
|
84
|
+
"extends": "@anolilab/semantic-release-preset"
|
|
85
85
|
}
|
|
86
86
|
```
|
|
87
|
+
|
|
87
88
|
<details>
|
|
88
89
|
<summary>File content of the extended preset</summary>
|
|
89
90
|
|
|
90
91
|
```json5
|
|
91
92
|
{
|
|
92
|
-
|
|
93
|
+
branches: [
|
|
93
94
|
"+([0-9])?(.{+([0-9]),x}).x",
|
|
94
95
|
"main",
|
|
95
96
|
"next",
|
|
96
97
|
"next-major",
|
|
97
98
|
{
|
|
98
|
-
|
|
99
|
-
|
|
99
|
+
name: "beta",
|
|
100
|
+
prerelease: true,
|
|
100
101
|
},
|
|
101
102
|
{
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
}
|
|
103
|
+
name: "alpha",
|
|
104
|
+
prerelease: true,
|
|
105
|
+
},
|
|
105
106
|
],
|
|
106
|
-
|
|
107
|
+
plugins: [
|
|
107
108
|
[
|
|
108
109
|
"@semantic-release/commit-analyzer",
|
|
109
110
|
{
|
|
110
|
-
|
|
111
|
-
}
|
|
111
|
+
preset: "conventionalcommits",
|
|
112
|
+
},
|
|
112
113
|
],
|
|
113
114
|
[
|
|
114
115
|
"@semantic-release/release-notes-generator",
|
|
115
116
|
{
|
|
116
|
-
|
|
117
|
-
}
|
|
117
|
+
preset: "conventionalcommits",
|
|
118
|
+
},
|
|
118
119
|
],
|
|
119
120
|
"@semantic-release/changelog",
|
|
120
121
|
"@semantic-release/npm", // optional
|
|
121
122
|
[
|
|
122
123
|
"@semantic-release/git",
|
|
123
124
|
{
|
|
124
|
-
|
|
125
|
-
}
|
|
125
|
+
message: "chore(release): ${nextRelease.gitTag} [skip ci]\\n\\n${nextRelease.notes}",
|
|
126
|
+
},
|
|
126
127
|
],
|
|
127
128
|
[
|
|
128
129
|
"@semantic-release/github",
|
|
129
130
|
{
|
|
130
|
-
|
|
131
|
-
|
|
131
|
+
successComment: false,
|
|
132
|
+
failComment: false,
|
|
133
|
+
},
|
|
134
|
+
],
|
|
135
|
+
],
|
|
136
|
+
}
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
</details>
|
|
140
|
+
|
|
141
|
+
### deprecation
|
|
142
|
+
|
|
143
|
+
You want deprecate old versions of your package?
|
|
144
|
+
|
|
145
|
+
#### Install
|
|
146
|
+
|
|
147
|
+
```bash
|
|
148
|
+
npm install --dev-save semantic-release-npm-deprecate-old-versions
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
```sh
|
|
152
|
+
pnpm add -D semantic-release-npm-deprecate-old-versions
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
```sh
|
|
156
|
+
yarn add -D semantic-release-npm-deprecate-old-versions
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
No problem, just add the following to your `.releaserc.json`:
|
|
160
|
+
|
|
161
|
+
```json
|
|
162
|
+
{
|
|
163
|
+
"extends": "@anolilab/semantic-release-preset/npm",
|
|
164
|
+
"plugins": [
|
|
165
|
+
[
|
|
166
|
+
"semantic-release-npm-deprecate-old-versions",
|
|
167
|
+
{
|
|
168
|
+
"rules": [
|
|
169
|
+
{
|
|
170
|
+
"rule": "supportLatest",
|
|
171
|
+
"options": {
|
|
172
|
+
"numberOfMajorReleases": 1,
|
|
173
|
+
"numberOfMinorReleases": 1,
|
|
174
|
+
"numberOfPatchReleases": 1
|
|
175
|
+
}
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
"rule": "supportPreReleaseIfNotReleased",
|
|
179
|
+
"options": {
|
|
180
|
+
"numberOfPreReleases": 1
|
|
181
|
+
}
|
|
182
|
+
},
|
|
183
|
+
"deprecateAll"
|
|
184
|
+
]
|
|
132
185
|
}
|
|
133
186
|
]
|
|
134
187
|
]
|
|
135
188
|
}
|
|
136
189
|
```
|
|
137
|
-
</details>
|
|
138
190
|
|
|
191
|
+
Find out how to configure the plugin [here](https://github.com/ghusse/semantic-release-npm-deprecate-old-versions).
|
|
139
192
|
|
|
140
193
|
## Environment Variables Configuration
|
|
141
194
|
|
|
142
195
|
Ensure that your CI configuration has the following environment variables set:
|
|
143
196
|
|
|
144
|
-
-
|
|
145
|
-
|
|
146
|
-
-
|
|
147
|
-
|
|
197
|
+
- GITHUB_TOKEN: [A GitHub personal access token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token)
|
|
198
|
+
- When a new release is published, this plugin will try to commit and push into the released branch. Ensure that the user that is running the release has push rights and can bypass branch protection rules.
|
|
199
|
+
- NPM_TOKEN: [A npm personal access token](https://www.npmjs.com/package/settings)
|
|
200
|
+
- A NPM token so the package can be published to NPM (a .npmrc file with extra configuration can also be used)
|
|
148
201
|
|
|
149
202
|
You can test your config with a dry run:
|
|
150
203
|
|
|
@@ -200,7 +253,7 @@ jobs:
|
|
|
200
253
|
|
|
201
254
|
- name: "Get yarn cache directory path"
|
|
202
255
|
id: "yarn-cache-dir-path"
|
|
203
|
-
run:
|
|
256
|
+
run: 'echo "::set-output name=dir::$(yarn config get cacheFolder)"'
|
|
204
257
|
|
|
205
258
|
- uses: "actions/cache@v2"
|
|
206
259
|
id: "yarn-cache" # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
|
|
@@ -243,7 +296,7 @@ jobs:
|
|
|
243
296
|
|
|
244
297
|
- name: "Get yarn cache directory path"
|
|
245
298
|
id: "yarn-cache-dir-path"
|
|
246
|
-
run:
|
|
299
|
+
run: 'echo "::set-output name=dir::$(yarn config get cacheFolder)"'
|
|
247
300
|
|
|
248
301
|
- uses: "actions/cache@v2"
|
|
249
302
|
id: "yarn-cache" # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
|
|
@@ -263,14 +316,15 @@ jobs:
|
|
|
263
316
|
- name: "Semantic Release"
|
|
264
317
|
if: "success()"
|
|
265
318
|
env:
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
319
|
+
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
|
|
320
|
+
NPM_TOKEN: "${{ secrets.NPM_AUTH_TOKEN }}"
|
|
321
|
+
GIT_AUTHOR_NAME: "github-actions-shell"
|
|
322
|
+
GIT_AUTHOR_EMAIL: "github-actions[bot]@users.noreply.github.com"
|
|
323
|
+
GIT_COMMITTER_NAME: "github-actions-shell"
|
|
324
|
+
GIT_COMMITTER_EMAIL: "github-actions[bot]@users.noreply.github.com"
|
|
272
325
|
run: "npx semantic-release"
|
|
273
326
|
```
|
|
327
|
+
|
|
274
328
|
</details>
|
|
275
329
|
|
|
276
330
|
To release multi package repositories, you need to install `@qiwi/multi-semantic-release` and `semantic-release`.
|
|
@@ -439,6 +493,7 @@ jobs:
|
|
|
439
493
|
commit_user_name: "prisis"
|
|
440
494
|
branch: "${{ github.head_ref }}"
|
|
441
495
|
```
|
|
496
|
+
|
|
442
497
|
</details>
|
|
443
498
|
|
|
444
499
|
## Note on GitHub protected branches
|
|
@@ -457,21 +512,18 @@ Libraries in this ecosystem make the best effort to track
|
|
|
457
512
|
[Node.js’ release schedule](https://nodejs.org/en/about/releases/). Here’s [a
|
|
458
513
|
post on why we think this is important](https://medium.com/the-node-js-collection/maintainers-should-consider-following-node-js-release-schedule-ab08ed4de71a).
|
|
459
514
|
|
|
460
|
-
Contributing
|
|
461
|
-
------------
|
|
515
|
+
## Contributing
|
|
462
516
|
|
|
463
517
|
If you would like to help take a look at the [list of issues](https://github.com/anolilab/javascript-style-guide/issues) and check our [Contributing](.github/CONTRIBUTING.md) guild.
|
|
464
518
|
|
|
465
519
|
> **Note:** please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.
|
|
466
520
|
|
|
467
|
-
Credits
|
|
468
|
-
-------------
|
|
521
|
+
## Credits
|
|
469
522
|
|
|
470
|
-
-
|
|
471
|
-
-
|
|
523
|
+
- [Daniel Bannert](https://github.com/prisis)
|
|
524
|
+
- [All Contributors](https://github.com/anolilab/javascript-style-guide/graphs/contributors)
|
|
472
525
|
|
|
473
|
-
License
|
|
474
|
-
-------------
|
|
526
|
+
## License
|
|
475
527
|
|
|
476
528
|
The anolilab javascript-style-guide is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT)
|
|
477
529
|
|
|
@@ -482,7 +534,6 @@ The anolilab javascript-style-guide is open-sourced software licensed under the
|
|
|
482
534
|
[5]: https://github.com/semantic-release/exec
|
|
483
535
|
[6]: https://github.com/semantic-release/git
|
|
484
536
|
[7]: https://github.com/semantic-release/npm
|
|
485
|
-
|
|
486
537
|
[license-image]: https://img.shields.io/npm/l/@anolilab/semantic-release-preset?color=blueviolet&style=for-the-badge
|
|
487
538
|
[license-url]: LICENSE.md "license"
|
|
488
539
|
[npm-image]: https://img.shields.io/npm/v/@anolilab/semantic-release-preset/latest.svg?style=for-the-badge&logo=npm
|
package/config/with-npm.json
CHANGED
|
@@ -23,7 +23,23 @@
|
|
|
23
23
|
[
|
|
24
24
|
"@semantic-release/release-notes-generator",
|
|
25
25
|
{
|
|
26
|
-
"preset": "conventionalcommits"
|
|
26
|
+
"preset": "conventionalcommits",
|
|
27
|
+
"presetConfig": {
|
|
28
|
+
"types": [
|
|
29
|
+
{ "type": "feat", "section": "Features" },
|
|
30
|
+
{ "type": "feature", "section": "Features" },
|
|
31
|
+
{ "type": "fix", "section": "Bug Fixes" },
|
|
32
|
+
{ "type": "perf", "section": "Performance Improvements" },
|
|
33
|
+
{ "type": "revert", "section": "Reverts" },
|
|
34
|
+
{ "type": "docs", "section": "Documentation", "hidden": false },
|
|
35
|
+
{ "type": "style", "section": "Styles", "hidden": false },
|
|
36
|
+
{ "type": "chore", "section": "Miscellaneous Chores", "hidden": false },
|
|
37
|
+
{ "type": "refactor", "section": "Code Refactoring", "hidden": false },
|
|
38
|
+
{ "type": "test", "section": "Tests", "hidden": false },
|
|
39
|
+
{ "type": "build", "section": "Build System", "hidden": false },
|
|
40
|
+
{ "type": "ci", "section": "Continuous Integration", "hidden": false }
|
|
41
|
+
]
|
|
42
|
+
}
|
|
27
43
|
}
|
|
28
44
|
],
|
|
29
45
|
"@semantic-release/changelog",
|
package/config/without-npm.json
CHANGED
|
@@ -23,7 +23,23 @@
|
|
|
23
23
|
[
|
|
24
24
|
"@semantic-release/release-notes-generator",
|
|
25
25
|
{
|
|
26
|
-
"preset": "conventionalcommits"
|
|
26
|
+
"preset": "conventionalcommits",
|
|
27
|
+
"presetConfig": {
|
|
28
|
+
"types": [
|
|
29
|
+
{ "type": "feat", "section": "Features" },
|
|
30
|
+
{ "type": "feature", "section": "Features" },
|
|
31
|
+
{ "type": "fix", "section": "Bug Fixes" },
|
|
32
|
+
{ "type": "perf", "section": "Performance Improvements" },
|
|
33
|
+
{ "type": "revert", "section": "Reverts" },
|
|
34
|
+
{ "type": "docs", "section": "Documentation", "hidden": false },
|
|
35
|
+
{ "type": "style", "section": "Styles", "hidden": false },
|
|
36
|
+
{ "type": "chore", "section": "Miscellaneous Chores", "hidden": false },
|
|
37
|
+
{ "type": "refactor", "section": "Code Refactoring", "hidden": false },
|
|
38
|
+
{ "type": "test", "section": "Tests", "hidden": false },
|
|
39
|
+
{ "type": "build", "section": "Build System", "hidden": false },
|
|
40
|
+
{ "type": "ci", "section": "Continuous Integration", "hidden": false }
|
|
41
|
+
]
|
|
42
|
+
}
|
|
27
43
|
}
|
|
28
44
|
],
|
|
29
45
|
"@semantic-release/changelog",
|