From e94124fb957c8c9a0cef7a2dde7ffb53c34baf3a Mon Sep 17 00:00:00 2001 From: Arthur Rezende Date: Thu, 28 Dec 2023 02:50:08 -0300 Subject: [PATCH] feat: setup semantic-release git plugin --- .github/workflows/release.yml | 3 +++ package.json | 1 + pnpm-lock.yaml | 32 ++++++++++++++++++++++++++++++++ release.config.js | 7 +++++++ 4 files changed, 43 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 01a3cac..dbb0d8e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,6 +21,9 @@ jobs: run: pnpm build - name: Semantic Release uses: cycjimmy/semantic-release-action@v3 + with: + extra_plugins: | + @semantic-release/git env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/package.json b/package.json index b13931a..9c9b23d 100644 --- a/package.json +++ b/package.json @@ -71,6 +71,7 @@ "@japa/spec-reporter": "^1.3.3", "@poppinss/dev-utils": "^2.0.3", "@poppinss/utils": "^5.0.0", + "@semantic-release/git": "^10.0.1", "@types/luxon": "^3.3.2", "@types/node": "^20.10.5", "@types/node-cron": "^3.0.11", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b5e7f49..5f25154 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -55,6 +55,9 @@ devDependencies: '@poppinss/utils': specifier: ^5.0.0 version: 5.0.0 + '@semantic-release/git': + specifier: ^10.0.1 + version: 10.0.1(semantic-release@22.0.12) '@types/luxon': specifier: ^3.3.2 version: 3.3.2 @@ -1326,11 +1329,35 @@ packages: - supports-color dev: true + /@semantic-release/error@3.0.0: + resolution: {integrity: sha512-5hiM4Un+tpl4cKw3lV4UgzJj+SmfNIDCLLw0TepzQxz9ZGV5ixnqkzIVF+3tp0ZHgcMKE+VNGHJjEeyFG2dcSw==} + engines: {node: '>=14.17'} + dev: true + /@semantic-release/error@4.0.0: resolution: {integrity: sha512-mgdxrHTLOjOddRVYIYDo0fR3/v61GNN1YGkfbrjuIKg/uMgCd+Qzo3UAXJ+woLQQpos4pl5Esuw5A7AoNlzjUQ==} engines: {node: '>=18'} dev: true + /@semantic-release/git@10.0.1(semantic-release@22.0.12): + resolution: {integrity: sha512-eWrx5KguUcU2wUPaO6sfvZI0wPafUKAMNC18aXY4EnNcrZL86dEmpNVnC9uMpGZkmZJ9EfCVJBQx4pV4EMGT1w==} + engines: {node: '>=14.17'} + peerDependencies: + semantic-release: '>=18.0.0' + dependencies: + '@semantic-release/error': 3.0.0 + aggregate-error: 3.1.0 + debug: 4.3.4 + dir-glob: 3.0.1 + execa: 5.1.1 + lodash: 4.17.21 + micromatch: 4.0.5 + p-reduce: 2.1.0 + semantic-release: 22.0.12(typescript@5.3.3) + transitivePeerDependencies: + - supports-color + dev: true + /@semantic-release/github@9.2.6(semantic-release@22.0.12): resolution: {integrity: sha512-shi+Lrf6exeNZF+sBhK+P011LSbhmIAoUEgEY6SsxF8irJ+J2stwI5jkyDQ+4gzYyDImzV6LCKdYB9FXnQRWKA==} engines: {node: '>=18'} @@ -6297,6 +6324,11 @@ packages: type-fest: 3.13.1 dev: true + /p-reduce@2.1.0: + resolution: {integrity: sha512-2USApvnsutq8uoxZBGbbWM0JIYLiEMJ9RlaN7fAzVNb9OZN0SHjjTTfIcb667XynS5Y1VhwDJVDa72TnPzAYWw==} + engines: {node: '>=8'} + dev: true + /p-reduce@3.0.0: resolution: {integrity: sha512-xsrIUgI0Kn6iyDYm9StOpOeK29XM1aboGji26+QEortiFST1hGZaUQOLhtEbqHErPpGW/aSz6allwK2qcptp0Q==} engines: {node: '>=12'} diff --git a/release.config.js b/release.config.js index 03bb0c5..ddc6304 100644 --- a/release.config.js +++ b/release.config.js @@ -1,3 +1,10 @@ module.exports = { branches: ['main'], + plugins: [ + '@semantic-release/git', + { + assets: ['package.json'], + message: 'chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}', + }, + ], }