@govbr-ds/release-config 1.0.1 → 1.1.0-alpha.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/README.md +35 -0
- package/package.json +3 -3
- package/{release.config.js → shared.config.js} +16 -8
package/README.md
CHANGED
|
@@ -24,6 +24,41 @@ Nessa configuração nós usamos os seguintes plugins:
|
|
|
24
24
|
|
|
25
25
|
A configuração compartilhada pode ser configurada conforme o [arquivo de configuração do semantic-release](https://github.com/semantic-release/semantic-release/blob/master/docs/usage/configuration.md#configuration):
|
|
26
26
|
|
|
27
|
+
### Exemplo
|
|
28
|
+
|
|
29
|
+
```javascript
|
|
30
|
+
const sharedConfig = require('@govbr-ds/release-config')
|
|
31
|
+
|
|
32
|
+
module.exports = {
|
|
33
|
+
branches: [...sharedConfig.branches],
|
|
34
|
+
plugins: [
|
|
35
|
+
sharedConfig.plugins.commitAnalyzer,
|
|
36
|
+
sharedConfig.plugins.releaseNotes,
|
|
37
|
+
// Configuração sobrescrita
|
|
38
|
+
[
|
|
39
|
+
'@semantic-release/changelog',
|
|
40
|
+
{
|
|
41
|
+
changelogTitle: '# CHANGELOG',
|
|
42
|
+
},
|
|
43
|
+
],
|
|
44
|
+
sharedConfig.plugins.gitlab,
|
|
45
|
+
sharedConfig.plugins.npm,
|
|
46
|
+
sharedConfig.plugins.git,
|
|
47
|
+
// Plugin não configurado no padrão (consulte a documentação do plugin para mais detalhes)
|
|
48
|
+
[
|
|
49
|
+
'semantic-release-discord',
|
|
50
|
+
{
|
|
51
|
+
onSuccessTemplate: {
|
|
52
|
+
username: 'Username',
|
|
53
|
+
content:
|
|
54
|
+
"A versão v$npm_package_version do projeto LOREM IPSUM já está disponível!",
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
],
|
|
58
|
+
],
|
|
59
|
+
}
|
|
60
|
+
```
|
|
61
|
+
|
|
27
62
|
### Configuração
|
|
28
63
|
|
|
29
64
|
Consulta a documentação de cada [plugin](#plugins) para entender o passo-a-passo para extender a configuração padrão.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@govbr-ds/release-config",
|
|
3
|
-
"version": "1.0.1",
|
|
3
|
+
"version": "1.1.0-alpha.1",
|
|
4
4
|
"description": "Configuração compartilhada do semantic-release para projetos do GOVBR-DS no gitlab",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"gitlab",
|
|
@@ -19,9 +19,9 @@
|
|
|
19
19
|
},
|
|
20
20
|
"license": "MIT",
|
|
21
21
|
"author": "SERPRO <govbr-ds@serpro.gov.br> (http://serpro.gov.br/)",
|
|
22
|
-
"main": "
|
|
22
|
+
"main": "shared.config.js",
|
|
23
23
|
"files": [
|
|
24
|
-
"
|
|
24
|
+
"shared.config.js"
|
|
25
25
|
],
|
|
26
26
|
"scripts": {
|
|
27
27
|
"commit": "git-cz",
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Arquivo com as configurações compartilhadas entre os projetos.
|
|
3
|
+
* Cada projeto deve importar essa configuração e usar conforme o README.md
|
|
4
|
+
*/
|
|
1
5
|
module.exports = {
|
|
2
6
|
branches: [
|
|
3
7
|
'main',
|
|
@@ -29,8 +33,12 @@ module.exports = {
|
|
|
29
33
|
prerelease: 'alpha',
|
|
30
34
|
},
|
|
31
35
|
],
|
|
32
|
-
|
|
33
|
-
|
|
36
|
+
/**
|
|
37
|
+
* As configurações de cada plugin não podem ser sobrescritas.
|
|
38
|
+
* Devem ser usadas por inteiro.
|
|
39
|
+
*/
|
|
40
|
+
plugins: {
|
|
41
|
+
commitAnalyzer: [
|
|
34
42
|
'@semantic-release/commit-analyzer',
|
|
35
43
|
{
|
|
36
44
|
preset: 'conventionalcommits',
|
|
@@ -58,7 +66,7 @@ module.exports = {
|
|
|
58
66
|
},
|
|
59
67
|
},
|
|
60
68
|
],
|
|
61
|
-
[
|
|
69
|
+
releaseNotes: [
|
|
62
70
|
'@semantic-release/release-notes-generator',
|
|
63
71
|
{
|
|
64
72
|
preset: 'conventionalcommits',
|
|
@@ -99,21 +107,21 @@ module.exports = {
|
|
|
99
107
|
},
|
|
100
108
|
},
|
|
101
109
|
],
|
|
102
|
-
[
|
|
110
|
+
changelog: [
|
|
103
111
|
'@semantic-release/changelog',
|
|
104
112
|
{
|
|
105
113
|
changelogTitle: '# CHANGELOG',
|
|
106
114
|
},
|
|
107
115
|
],
|
|
108
|
-
[
|
|
116
|
+
gitlab: [
|
|
109
117
|
'@semantic-release/gitlab',
|
|
110
118
|
{
|
|
111
119
|
successComment:
|
|
112
120
|
':tada: Essa issue foi resolvida na versão ${nextRelease.version} :tada:\n\nPara mais detalhes:\n- [GitLab release](${CI_PROJECT_URL}/-/releases/${nextRelease.version})\n- [GitLab tag](${CI_PROJECT_URL}/-/tags/${nextRelease.version})',
|
|
113
121
|
},
|
|
114
122
|
],
|
|
115
|
-
'@semantic-release/npm',
|
|
116
|
-
[
|
|
123
|
+
npm: ['@semantic-release/npm'],
|
|
124
|
+
git: [
|
|
117
125
|
'@semantic-release/git',
|
|
118
126
|
{
|
|
119
127
|
assets: ['package.json', 'CHANGELOG.md'],
|
|
@@ -121,5 +129,5 @@ module.exports = {
|
|
|
121
129
|
'chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}',
|
|
122
130
|
},
|
|
123
131
|
],
|
|
124
|
-
|
|
132
|
+
},
|
|
125
133
|
}
|