From 6252312b0ab2dde5559a65a2a51fa19baf57b3fa Mon Sep 17 00:00:00 2001 From: Brayan batista zuniga Date: Thu, 14 Mar 2024 09:12:44 -0500 Subject: [PATCH] =?UTF-8?q?fix:=20ajuste=20documentaci=C3=B3n=20para=20adi?= =?UTF-8?q?ci=C3=B3n=20de=20secci=C3=B3n=20de=20ejemplos,=20ajustes=20para?= =?UTF-8?q?=20customizar=20las=20secciones=20en=20el=20release=20notes=20g?= =?UTF-8?q?enerator,=20adici=C3=B3n=20dependencias=20en=20archivo=20yaml?= =?UTF-8?q?=20[skip=20release]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/semantic-release.yml | 4 +-- .releaserc | 50 ++++++++++++++++++++++++-- SEMANTIC-RELEASE.md | 50 +++++++++++++++++++------- 3 files changed, 87 insertions(+), 17 deletions(-) diff --git a/.github/workflows/semantic-release.yml b/.github/workflows/semantic-release.yml index 6f4a4d2..28717f2 100644 --- a/.github/workflows/semantic-release.yml +++ b/.github/workflows/semantic-release.yml @@ -39,10 +39,10 @@ jobs: otp-version: ${{ env.OTP_VERSION }} - name: Setup semantic-release - run: npm install -g semantic-release @semantic-release/changelog @semantic-release/github -D + run: npm install -g semantic-release @semantic-release/changelog @semantic-release/github conventional-changelog-eslint conventional-changelog-conventionalcommits conventional-changelog-angular -D - name: Call semantic-release - run: npx -p @semantic-release/changelog semantic-release + run: npx -p conventional-changelog-eslint -p conventional-changelog-conventionalcommits -p @semantic-release/changelog semantic-release - name: Set variables From git tag command if: ${{ ( env.PUBLISH_ARTIFACT == 'true' ) }} diff --git a/.releaserc b/.releaserc index 8412468..b9ecded 100644 --- a/.releaserc +++ b/.releaserc @@ -2,8 +2,54 @@ "repositoryUrl": "https://github.com/bancolombia/distributed-performance-analyzer.git", "branches": ["main"], "plugins": [ - "@semantic-release/commit-analyzer", - "@semantic-release/release-notes-generator", + [ + "@semantic-release/commit-analyzer", + { + "preset": "eslint", + "releaseRules": [ + { "tag": "breaking", "release": "major" }, + { "tag": "feat", "release": "minor" }, + { "tag": "chore", "release": "minor" }, + { "tag": "refactor", "release": "minor" }, + { "tag": "update", "release": "minor" }, + { "tag": "upgrade", "release": "minor" }, + { "tag": "docs", "release": "patch" }, + { "tag": "ci", "release": "patch" }, + { "tag": "fix", "release": "patch" }, + { "tag": "test", "release": "patch" }, + { "tag": "perf", "release": "patch" }, + { "scope": "no-release", "release": false } + ] + } + ], + [ + "@semantic-release/release-notes-generator", { + "preset": "conventionalcommits", + "presetConfig": { + "types": [ + { "type": "breaking", "section": "Major version release", "hidden": false }, + { "type": "BREAKING", "section": "Major version release", "hidden": false }, + { "type": "BREAKING CHANGE", "section": "Major version release", "hidden": false }, + { "type": "BREAKING CHANGES", "section": "Major version release", "hidden": false }, + { "type": "feat", "section": "Features", "hidden": false }, + { "type": "fix", "section": "Bug Fixes", "hidden": false }, + { "type": "hotfix", "section": "Bug Fixes", "hidden": false }, + { "type": "update", "section": "Updates", "hidden": false }, + { "type": "upgrade", "section": "Upgrades", "hidden": false }, + { "type": "docs", "section": "Documentation", "hidden": false }, + { "type": "chore", "section": "Chores", "hidden": false }, + { "type": "build", "section": "CI/CD Changes", "hidden": false }, + { "type": "ci", "section": "CI/CD Changes", "hidden": false }, + { "type": "test", "section": "Tests", "hidden": false }, + { "type": "refactor", "section": "Refactoring", "hidden": false }, + { "type": "perf", "section": "Performance Improvements", "hidden": false } + ] + }, + "writerOpts": { + "commitsSort": ["subject", "scope"] + } + } + ], "@semantic-release/github" ] } diff --git a/SEMANTIC-RELEASE.md b/SEMANTIC-RELEASE.md index 06e7bcf..2025792 100644 --- a/SEMANTIC-RELEASE.md +++ b/SEMANTIC-RELEASE.md @@ -9,24 +9,48 @@ Se pueden utilizar herramientas como commitizen o commit-lint para ayudar a los La siguiente tabla muestra qué mensaje de confirmación le proporciona qué tipo de versión cuando se ejecuta la versión semántica (usando la configuración predeterminada): +**formato version:** `v<>.<>.<>` + | Commit Message | Release type | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------- | -| `fix(pencil): stop graphite breaking when too much pressure applied` | ~~Patch~~ Fix Release | -| `feat(pencil): add 'graphiteWidth' option` | ~~Minor~~ Feature Release | -| `perf(pencil): remove graphiteWidth option`

`BREAKING CHANGE: The graphiteWidth option has been removed.`
`The default graphite width of 10mm is always used for performance reasons.` | ~~Major~~ Breaking Release
(Note that the `BREAKING CHANGE: ` token must be in the footer of the commit) | +| `fix: stop graphite breaking when too much pressure applied` | ~~Patch~~ Fix Release | +| `feat: add 'graphiteWidth' option` | ~~Minor~~ Feature Release | +| `breaking: add 'graphiteWidth' option` | ~~Major~~ Feature Release | +| `perf: remove graphiteWidth option`

`BREAKING CHANGE: The graphiteWidth option has been removed.`
`The default graphite width of 10mm is always used for performance reasons.` | ~~Major~~ Breaking Release
(Note that the `BREAKING CHANGE: ` token must be in the footer of the commit) | + + **[link a la fuente.](https://github.com/semantic-release/semantic-release?tab=readme-ov-file#Commit%20message%20format)** dentro de la documentación de angular sobre convenciones de mensajes se tienen estos adicionales: -- **build:** cambios que afectan el sistema de compilación o las dependencias externas (alcances de ejemplo: gulp, broccoli, npm). -- **ci:** Cambios en nuestros archivos y scripts de configuración de CI (ejemplos: CircleCi, SauceLabs). -- **docs:** La documentación solo cambia. -- **feat:** una nueva característica. -- **fix:** una corrección de errores. -- **perf:** Un cambio de código que mejora el rendimiento. -- **refactor:** un cambio de código que no corrige un error ni agrega una característica. -- **test:** agregar pruebas faltantes o corregir pruebas existentes. +**breaking:** Aumento de **major** version debido a cambio significante. `v1.0.0 --> v2.0.0`
+**update:** Aumento de **minor** version debido a cambio moderado. `v1.0.0 --> v1.1.0`
+**upgrade:** Aumento de **minor** version debido a cambio moderado. `v1.0.0 --> v1.1.0`
+**refactor:** Aumento de **minor** version debido a refactorización de código. `v1.0.0 --> v1.1.0`
+**chore:** Aumento de **minor** version debido a conjunto de cambios moderados. `v1.0.0 --> v1.1.0`
+**docs:** Aumento de **minor** version debido a La documentación. `v1.0.0 --> v1.0.1`
+**ci:** Aumento de **patch** version debido a cambios en CI. `v1.0.0 --> v1.0.1`
+**test:** Aumento de **patch** version debido a agregar pruebas faltantes o corregir pruebas existentes. `v1.0.0 --> v1.0.1`
+**perf:** Aumento de **patch** version debido a Un cambio de código que mejora el rendimiento. `v1.0.0 --> v1.0.1` + +## Excluir commit del análisis del plugin: + +Todas las confirmaciones que contengan [skip release] or [release skip] en su mensaje se excluirán del análisis de confirmación y no participarán en la determinación del tipo de versión. + +## Ejemplos + +### major version example +**commit message**
+`fix: some message` + +`BREAKING CHANGE: It will be significant" # passes` + +### minor version example +**commit message**
+`feat: some message` ó `refactor: some message` ó `update: some message` -## excluir commit del análisis del plugin: +### patch version example +**commit message**
+`fix: some message` ó `ci: some message` ó `test: some message` -Todas las confirmaciones que contengan [skip release] or [release skip] en su mensaje se excluirán del análisis de confirmación y no participarán en la determinación del tipo de versión. \ No newline at end of file +**[link a mas ejemplos.](https://github.com/conventional-changelog/commitlint/tree/master/@commitlint/config-conventional#type-enum)** \ No newline at end of file