plutin 1.7.10 → 1.7.11
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/package.json +2 -2
- package/readme.md +36 -8
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -1,16 +1,23 @@
|
|
|
1
|
-
### Fluxo completo:
|
|
1
|
+
### Fluxo completo (Publicação Automática):
|
|
2
2
|
|
|
3
3
|
- Mudanças no código.
|
|
4
|
-
- Atualiza a versão no package.json
|
|
5
|
-
- Comita
|
|
6
|
-
- Cria e envia uma tag:
|
|
4
|
+
- Atualiza a versão no `package.json`.
|
|
5
|
+
- Comita e faz push para `master` ou `main`:
|
|
7
6
|
|
|
7
|
+
```bash
|
|
8
|
+
git add .
|
|
9
|
+
git commit -m "feat: nova funcionalidade"
|
|
10
|
+
git push origin master
|
|
8
11
|
```
|
|
9
|
-
git tag v1.2.0
|
|
10
|
-
git push origin v1.2.0
|
|
11
|
-
```
|
|
12
12
|
|
|
13
|
-
O CI
|
|
13
|
+
O CI detecta automaticamente a nova versão e:
|
|
14
|
+
|
|
15
|
+
- ✅ Executa os testes
|
|
16
|
+
- ✅ Faz o build do projeto
|
|
17
|
+
- ✅ Publica no NPM (se a versão ainda não existir)
|
|
18
|
+
- ✅ Cria uma tag Git automaticamente (ex: `v1.2.0`)
|
|
19
|
+
|
|
20
|
+
**Nota:** O workflow também funciona com tags manuais (`git push origin v1.2.0`).
|
|
14
21
|
|
|
15
22
|
### Commits
|
|
16
23
|
|
|
@@ -35,6 +42,27 @@ Quando usar
|
|
|
35
42
|
- 1.1.1: Corrigiu bugs sem mudar funcionalidade
|
|
36
43
|
- 2.0.0: Mudança que quebra compatibilidade
|
|
37
44
|
|
|
45
|
+
### Configuração do NPM Token (GitHub Actions)
|
|
46
|
+
|
|
47
|
+
Para que a publicação automática funcione, você precisa configurar um token do NPM no GitHub:
|
|
48
|
+
|
|
49
|
+
1. **Criar um token no NPM:**
|
|
50
|
+
|
|
51
|
+
- Acesse: https://www.npmjs.com/settings/[seu-usuario]/tokens
|
|
52
|
+
- Clique em "Generate New Token"
|
|
53
|
+
- Escolha "Granular Access Token" (recomendado)
|
|
54
|
+
- Configure as permissões: **Read & Write** para o pacote `plutin`
|
|
55
|
+
- Copie o token gerado
|
|
56
|
+
|
|
57
|
+
2. **Adicionar o token no GitHub:**
|
|
58
|
+
- Vá para: `Settings` > `Secrets and variables` > `Actions` no seu repositório
|
|
59
|
+
- Clique em "New repository secret"
|
|
60
|
+
- Nome: `NPM_TOKEN`
|
|
61
|
+
- Valor: Cole o token copiado do NPM
|
|
62
|
+
- Salve
|
|
63
|
+
|
|
64
|
+
**Importante:** Tokens granulares têm validade de 90 dias e exigem 2FA. Atualize o token antes de expirar.
|
|
65
|
+
|
|
38
66
|
### Padrões
|
|
39
67
|
|
|
40
68
|
Body - camelCase - snake_case
|