Skip to content

Commit

Permalink
ci: 🔧 Ajustado workflow de release
Browse files Browse the repository at this point in the history
  • Loading branch information
LiloMarino committed Oct 26, 2024
1 parent 4f798f5 commit 286288c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,14 @@ 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 main

- name: Create Pull Request to merge release into main
env:
Expand Down
6 changes: 2 additions & 4 deletions release.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,14 @@ 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');
},
};

export default {
branches: ['main', 'develop'],
branches: ['main', 'release'],
plugins: [
'@semantic-release/commit-analyzer',
'@semantic-release/release-notes-generator',
Expand All @@ -28,8 +27,7 @@ export default {
['@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'
branch: 'release', // Especifica a branch de commit
}],
],
};

0 comments on commit 286288c

Please sign in to comment.