Skip to content

Commit 176aef2

Browse files
authored
feat(release)!: renomeia fivem-scripts para workflows (#4) (#6)
* @ feat(release)!: renomeia pacote fivem-scripts para workflows (issue #4) Aposenta o nome antigo @mri-qbox-brasil/fivem-scripts / bin fivem-scripts, migrando todas as referencias para @mri-qbox-brasil/workflows / bin workflows. - .release/package.json + package-lock.json: name e bin - .release/bin/cli.js: usage string - .release/release.config.callable.cjs: npx fivem-scripts -> npx workflows - callable-release.yml / callable-update-actions.yml: npm install + npx + nomes de step - README.md / MANUAL.md: nome do pacote e tabela de comandos BREAKING CHANGE: o pacote passa a ser publicado como @mri-qbox-brasil/workflows. O pacote antigo permanece publicado para refs fixadas. Cutover: o novo nome e publicado manualmente antes do merge para evitar janela sem pacote. Nao toca em fxmanifest.lua nem reintroduz o nome antigo. Empilhado sobre o fix #3. @ * @ docs: atualiza nome antigo do repo template-fivem para workflows (#4) Titulos do README/MANUAL e o exemplo `uses:` ainda apontavam para mri-Qbox-Brasil/template-fivem (nome antigo deste repo). Migra para mri-Qbox-Brasil/workflows. Refs ao script-template (repo de template de scripts) permanecem inalteradas. @
1 parent 3194374 commit 176aef2

8 files changed

Lines changed: 22 additions & 22 deletions

File tree

.github/workflows/callable-release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,10 @@ jobs:
5656
registry-url: 'https://npm.pkg.github.com'
5757
scope: '@mri-qbox-brasil'
5858

59-
- name: Install fivem-scripts e semantic-release
59+
- name: Install workflows e semantic-release
6060
run: |
6161
npm install --no-save \
62-
@mri-qbox-brasil/fivem-scripts \
62+
@mri-qbox-brasil/workflows \
6363
semantic-release \
6464
@semantic-release/changelog \
6565
@semantic-release/commit-analyzer \
@@ -218,7 +218,7 @@ jobs:
218218
'@semantic-release/release-notes-generator',
219219
'@semantic-release/changelog',
220220
['@semantic-release/exec', {
221-
prepareCmd: "REPO_NAME=$(echo $GITHUB_REPOSITORY | cut -d'/' -f2) && npx fivem-scripts set-version ${nextRelease.version} \"$WEB_PATH\" && npx fivem-scripts build \"$REPO_NAME\" \"$WEB_PATH\"",
221+
prepareCmd: "REPO_NAME=$(echo $GITHUB_REPOSITORY | cut -d'/' -f2) && npx workflows set-version ${nextRelease.version} \"$WEB_PATH\" && npx workflows build \"$REPO_NAME\" \"$WEB_PATH\"",
222222
// Notifica o Discord só quando uma versão é de fato publicada.
223223
// Passa apenas a versão (semver) — o script busca as notas via API.
224224
successCmd: "node .ci/discord-release.js '${nextRelease.version}'"

.github/workflows/callable-update-actions.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ jobs:
2929
registry-url: 'https://npm.pkg.github.com'
3030
scope: '@mri-qbox-brasil'
3131

32-
- name: Install fivem-scripts
33-
run: npm install --no-save @mri-qbox-brasil/fivem-scripts
32+
- name: Install workflows
33+
run: npm install --no-save @mri-qbox-brasil/workflows
3434
env:
3535
NODE_AUTH_TOKEN: ${{ secrets.GH_TOKEN }}
3636

3737
- name: Run update
38-
run: npx fivem-scripts update-actions
38+
run: npx workflows update-actions
3939
env:
4040
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
4141
PR_TEAM: ${{ inputs.pr-team }}

.release/bin/cli.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const commands = {
1515
}
1616

1717
if (!command || !commands[command]) {
18-
console.error(`Usage: fivem-scripts <${Object.keys(commands).join('|')}> [args...]`)
18+
console.error(`Usage: workflows <${Object.keys(commands).join('|')}> [args...]`)
1919
process.exit(1)
2020
}
2121

.release/package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.release/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
2-
"name": "@mri-qbox-brasil/fivem-scripts",
2+
"name": "@mri-qbox-brasil/workflows",
33
"version": "0.0.0-development",
44
"description": "Scripts de build, release e docs para recursos FiveM da MRI Qbox Brasil",
55
"bin": {
6-
"fivem-scripts": "./bin/cli.js"
6+
"workflows": "./bin/cli.js"
77
},
88
"files": [
99
"bin/",

.release/release.config.callable.cjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ module.exports = {
88
[
99
'@semantic-release/exec',
1010
{
11-
prepareCmd: "REPO_NAME=$(echo $GITHUB_REPOSITORY | cut -d'/' -f2) && npx fivem-scripts set-version ${nextRelease.version} \"$WEB_PATH\" && npx fivem-scripts build \"$REPO_NAME\" \"$WEB_PATH\""
11+
prepareCmd: "REPO_NAME=$(echo $GITHUB_REPOSITORY | cut -d'/' -f2) && npx workflows set-version ${nextRelease.version} \"$WEB_PATH\" && npx workflows build \"$REPO_NAME\" \"$WEB_PATH\""
1212
}
1313
],
1414
// Commita de volta o bump do package.json do front e o CHANGELOG para

MANUAL.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# Manual — template-fivem Workflow Library
1+
# Manual — workflows Workflow Library
22

33
## Visão Geral
44

5-
Este repositório fornece workflows reutilizáveis (`workflow_call`) e o pacote npm `@mri-qbox-brasil/fivem-scripts` para os scripts FiveM da MRI Qbox Brasil.
5+
Este repositório fornece workflows reutilizáveis (`workflow_call`) e o pacote npm `@mri-qbox-brasil/workflows` para os scripts FiveM da MRI Qbox Brasil.
66

77
## Callables disponíveis
88

@@ -32,10 +32,10 @@ Abre PR sincronizando o repositório com o `script-template`.
3232

3333
## Pacote npm
3434

35-
O pacote `@mri-qbox-brasil/fivem-scripts` é publicado automaticamente a cada release e expõe:
35+
O pacote `@mri-qbox-brasil/workflows` é publicado automaticamente a cada release e expõe:
3636

3737
| Comando | Descrição |
3838
|---|---|
39-
| `fivem-scripts build <nome>` | Build e empacotamento do recurso em zip |
40-
| `fivem-scripts set-version` | Injeta versão no `fxmanifest.lua` |
41-
| `fivem-scripts update-actions` | Atualiza versões de actions nos workflows |
39+
| `workflows build <nome> [web-dir]` | Build e empacotamento do recurso em zip |
40+
| `workflows set-version <versão> [web-dir]` | Injeta versão no `fxmanifest.lua` e sincroniza `web/package.json` |
41+
| `workflows update-actions` | Atualiza versões de actions nos workflows |

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# template-fivem — Workflow Library
1+
# workflows — Workflow Library
22

33
Repositório central de workflows reutilizáveis (callables) para os scripts FiveM da MRI Qbox Brasil.
44

5-
Também publica o pacote npm `@mri-qbox-brasil/fivem-scripts`, que contém os scripts de build e release usados pelos callables.
5+
Também publica o pacote npm `@mri-qbox-brasil/workflows`, que contém os scripts de build e release usados pelos callables.
66

77
---
88

@@ -22,7 +22,7 @@ Nos repositórios de script, delegue para os callables:
2222
```yaml
2323
jobs:
2424
release:
25-
uses: mri-Qbox-Brasil/template-fivem/.github/workflows/callable-release.yml@main
25+
uses: mri-Qbox-Brasil/workflows/.github/workflows/callable-release.yml@main
2626
secrets:
2727
GH_TOKEN: ${{ secrets.GH_TOKEN }}
2828
```

0 commit comments

Comments
 (0)