@govbr-ds/release-config 1.0.0

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2022 SERPRO
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,67 @@
1
+ # GOVBR-DS - Commit Config
2
+
3
+ ## Objetivo
4
+
5
+ Compartilhar os padrões de commit entre os projetos do [GOVBR-DS](https://gov.br/ds 'GOVBR-DS').
6
+
7
+ ## Como instalar nossa biblioteca em seu projeto?
8
+
9
+ ```bash
10
+ npm install --save-dev semantic-release @govbr-ds/release-config
11
+ ```
12
+
13
+ ## Plugins
14
+
15
+ Nessa configuração nós usamos os seguintes plugins:
16
+
17
+ - [`@semantic-release/commit-analyzer`](https://github.com/semantic-release/commit-analyzer)
18
+ - [`@semantic-release/release-notes-generator`](https://github.com/semantic-release/release-notes-generator)
19
+ - [`@semantic-release/changelog`](https://github.com/semantic-release/changelog)
20
+ - [`@semantic-release/gitlab`](https://github.com/semantic-release/gitlab)
21
+
22
+ ## Como usar?
23
+
24
+ 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):
25
+
26
+ ```yml
27
+ ---
28
+ extends: "@govbr-ds/release-config"
29
+ ```
30
+
31
+ ### Configuração
32
+
33
+ Consulta a documentação de cada [plugin](#plugins) para entender o passo-a-passo para extender a configuração padrão.
34
+
35
+ ## Como contribuir?
36
+
37
+ Antes de abrir um Merge Request tenha em mente algumas informações:
38
+
39
+ - Esse é um projeto opensource e contribuições são bem-vindas.
40
+ - Para facilitar a aprovação da sua contribuição, escolha um título curto, simples e explicativo para o MR, e siga os padrões da nossa [wiki](https://govbr-ds.gitlab.io/govbr-ds-wiki/ 'Wiki').
41
+ - Quer contribuir com o projeto? Confira o nosso guia [como contribuir](./CONTRIBUTING.md 'Como contribuir?').
42
+
43
+ ## Reportar bugs/necessidades
44
+
45
+ Você pode usar as [issues](https://gitlab.com/govbr-ds/govbr-ds-release-config/-/issues/new) para nos informar os problemas que tem enfrentado ao usar nossa biblioteca ou mesmo o que gostaria que fizesse parte do projeto. Por favor use o modelo que mais se encaixa na sua necessidade e preencha com o máximo de detalhes possível.
46
+
47
+ Nos comprometemos a responder a todas as issues
48
+
49
+ ## Precisa de ajuda?
50
+
51
+ > Por favor **não** crie issues para fazer perguntas...
52
+
53
+ Use nossos canais abaixo para obter tirar suas dúvidas:
54
+
55
+ - Site do GOVBR-DS [http://gov.br/ds](http://gov.br/ds)
56
+
57
+ - Pelo nosso email [govbr-ds@serpro.gov.br](govbr-ds@serpro.gov.br)
58
+
59
+ - Usando nosso canal no discord [https://discord.gg/U5GwPfqhUP](https://discord.gg/U5GwPfqhUP)
60
+
61
+ ## Padrão de commits
62
+
63
+ Para mais informações sobre o padrão de commits consulte [a nossa Wiki](https://govbr-ds.gitlab.io/govbr-ds-wiki/git-gitlab/guias/commit/ 'Padrão de commit').
64
+
65
+ ## Licença
66
+
67
+ Nesse projeto usamos a licença MIT.
package/package.json ADDED
@@ -0,0 +1,50 @@
1
+ {
2
+ "name": "@govbr-ds/release-config",
3
+ "version": "1.0.0",
4
+ "description": "Configuração compartilhada do semantic-release para projetos do GOVBR-DS no gitlab",
5
+ "keywords": [
6
+ "gitlab",
7
+ "govbr-ds",
8
+ "conventional-changelog",
9
+ "semantic-release",
10
+ "semantic-release-config"
11
+ ],
12
+ "homepage": "https://gov.br/ds/",
13
+ "bugs": {
14
+ "url": "https://gitlab.com/govbr-ds/govbr-ds-release-config/issues"
15
+ },
16
+ "repository": {
17
+ "type": "git",
18
+ "url": "git@gitlab.com:govbr-ds/govbr-ds-release-config.git"
19
+ },
20
+ "license": "MIT",
21
+ "author": "SERPRO <govbr-ds@serpro.gov.br> (http://serpro.gov.br/)",
22
+ "main": "release.config.js",
23
+ "files": [
24
+ "release.config.js"
25
+ ],
26
+ "scripts": {
27
+ "commit": "git-cz",
28
+ "prepare": "husky install",
29
+ "semantic-release": "semantic-release"
30
+ },
31
+ "config": {
32
+ "commitizen": {
33
+ "path": "@commitlint/cz-commitlint"
34
+ }
35
+ },
36
+ "dependencies": {
37
+ "@semantic-release/changelog": "^6.0.1",
38
+ "@semantic-release/git": "^10.0.1",
39
+ "@semantic-release/gitlab": "^9.4.2",
40
+ "semantic-release": "^19.0.5"
41
+ },
42
+ "devDependencies": {
43
+ "@commitlint/cli": "^17.1.2",
44
+ "@commitlint/cz-commitlint": "^17.1.2",
45
+ "@govbr-ds/commit-config": "*",
46
+ "git-pull-run": "^1.0.2",
47
+ "husky": "^8.0.1",
48
+ "prettier": "^2.7.1"
49
+ }
50
+ }
@@ -0,0 +1,194 @@
1
+ module.exports = {
2
+ branches: [
3
+ 'main',
4
+ '+([0-9])?(.{+([0-9]),x}).x',
5
+ 'next',
6
+ 'next-major',
7
+ {
8
+ name: '+([0-9])?(.{+([0-9]),x}).x-rc',
9
+ prerelease: 'rc',
10
+ },
11
+ {
12
+ name: '+([0-9])?(.{+([0-9]),x}).x-beta',
13
+ prerelease: 'beta',
14
+ },
15
+ {
16
+ name: '+([0-9])?(.{+([0-9]),x}).x-alpha',
17
+ prerelease: 'alpha',
18
+ },
19
+ {
20
+ name: 'rc',
21
+ prerelease: 'rc',
22
+ },
23
+ {
24
+ name: 'beta',
25
+ prerelease: 'beta',
26
+ },
27
+ {
28
+ name: 'alpha',
29
+ prerelease: 'alpha',
30
+ },
31
+ ],
32
+ plugins: [
33
+ [
34
+ '@semantic-release/commit-analyzer',
35
+ {
36
+ preset: 'conventionalcommits',
37
+ releaseRules: [
38
+ {
39
+ type: 'build',
40
+ release: false,
41
+ },
42
+ {
43
+ type: 'chore',
44
+ release: false,
45
+ },
46
+ {
47
+ type: 'ci',
48
+ release: false,
49
+ },
50
+ {
51
+ type: 'deprecated',
52
+ release: false,
53
+ },
54
+ {
55
+ type: 'docs',
56
+ release: 'patch',
57
+ },
58
+ {
59
+ type: 'feat',
60
+ release: 'minor',
61
+ },
62
+ {
63
+ type: 'fix',
64
+ release: 'patch',
65
+ },
66
+ {
67
+ type: 'perf',
68
+ release: 'patch',
69
+ },
70
+ {
71
+ type: 'refactor',
72
+ release: 'patch',
73
+ },
74
+ {
75
+ type: 'removed',
76
+ release: 'minor',
77
+ },
78
+ {
79
+ type: 'revert',
80
+ release: 'minor',
81
+ },
82
+ {
83
+ type: 'style',
84
+ release: false,
85
+ },
86
+ {
87
+ type: 'test',
88
+ release: false,
89
+ },
90
+ {
91
+ type: 'wip',
92
+ release: false,
93
+ },
94
+ {
95
+ scope: 'no-release',
96
+ release: false,
97
+ },
98
+ ],
99
+ },
100
+ ],
101
+ [
102
+ '@semantic-release/release-notes-generator',
103
+ {
104
+ preset: 'conventionalcommits',
105
+ parserOpts: {
106
+ noteKeywords: ['BREAKING CHANGE', 'BREAKING CHANGES', 'BREAKING'],
107
+ types: [
108
+ {
109
+ type: 'build',
110
+ hidden: true,
111
+ },
112
+ {
113
+ type: 'chore',
114
+ hidden: true,
115
+ },
116
+ {
117
+ type: 'ci',
118
+ hidden: true,
119
+ },
120
+ {
121
+ type: 'deprecated',
122
+ section: 'Depreciado/Obsoleto',
123
+ },
124
+ {
125
+ type: 'docs',
126
+ section: 'Documentação',
127
+ },
128
+ {
129
+ type: 'feat',
130
+ section: 'Novidades',
131
+ },
132
+ {
133
+ type: 'fix',
134
+ section: 'Correções',
135
+ },
136
+ {
137
+ type: 'perf',
138
+ section: 'Performance',
139
+ },
140
+ {
141
+ type: 'refactor',
142
+ section: 'Refatorado',
143
+ },
144
+ {
145
+ type: 'removed',
146
+ section: 'Removido',
147
+ },
148
+ {
149
+ type: 'revert',
150
+ section: 'Revertido/Rollback',
151
+ },
152
+ {
153
+ type: 'style',
154
+ hidden: true,
155
+ },
156
+ {
157
+ type: 'test',
158
+ hidden: true,
159
+ },
160
+ {
161
+ type: 'wip',
162
+ hidden: true,
163
+ },
164
+ ],
165
+ },
166
+ writerOpts: {
167
+ commitsSort: ['subject', 'scope'],
168
+ },
169
+ },
170
+ ],
171
+ [
172
+ '@semantic-release/changelog',
173
+ {
174
+ changelogTitle: '# CHANGELOG',
175
+ },
176
+ ],
177
+ [
178
+ '@semantic-release/gitlab',
179
+ {
180
+ successComment:
181
+ ':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})',
182
+ },
183
+ ],
184
+ '@semantic-release/npm',
185
+ [
186
+ '@semantic-release/git',
187
+ {
188
+ assets: ['package.json', 'CHANGELOG.md'],
189
+ message:
190
+ 'chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}',
191
+ },
192
+ ],
193
+ ],
194
+ }