From bd82dd3f593d6d0206a3055f22f38ecd6938a5e2 Mon Sep 17 00:00:00 2001 From: Murilo Date: Sat, 26 Oct 2024 10:59:26 -0300 Subject: [PATCH] ci: :wrench: Ajustado workflow de release --- .github/workflows/release.yml | 9 ++++++--- release.config.js | 8 +++----- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ef3a36e..881f308 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -19,12 +19,15 @@ jobs: - name: Install dependencies run: npm ci - + + - name: Create or update release branch + run: | + git checkout -B release + - name: Run semantic-release env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - npx semantic-release --branches main + run: npx semantic-release --branches release - name: Create Pull Request to merge release into main env: diff --git a/release.config.js b/release.config.js index 4b9f1b6..8c1766d 100644 --- a/release.config.js +++ b/release.config.js @@ -9,7 +9,6 @@ const generatePatchNotes = { date: new Date().toISOString(), }; - // Grava o arquivo JSON na pasta public console.log('Gerando patch notes...'); writeFileSync('public/patch-notes.json', JSON.stringify(patchNotes, null, 2)); console.log('Patch notes gerados com sucesso em public/patch-notes.json'); @@ -17,7 +16,7 @@ const generatePatchNotes = { }; export default { - branches: ['main', 'develop'], + branches: ['main', 'release'], plugins: [ '@semantic-release/commit-analyzer', '@semantic-release/release-notes-generator', @@ -27,9 +26,8 @@ export default { '@semantic-release/changelog', ['@semantic-release/git', { assets: ['CHANGELOG.md', 'package.json', 'public/patch-notes.json'], - message: 'chore(release): :bookmark: Update changelog and patch notes', - // Aqui vocĂȘ especifica a branch onde deseja que os commits ocorram - branch: 'release' + message: 'chore(release): :bookmark: Update changelog and patch notes [skip ci]', + branch: 'release', // Especifica a branch de commit }], ], };