Skip to content

Commit

Permalink
feat: ✨ Adicionado pop-up de patch notes
Browse files Browse the repository at this point in the history
  • Loading branch information
LiloMarino committed Oct 26, 2024
1 parent cc5d03d commit 19c58c3
Show file tree
Hide file tree
Showing 6 changed files with 371 additions and 11 deletions.
10 changes: 0 additions & 10 deletions .releaserc.json

This file was deleted.

283 changes: 283 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,14 @@
"uuid": "^10.0.0"
},
"devDependencies": {
"@semantic-release/changelog": "^6.0.3",
"@semantic-release/commit-analyzer": "^13.0.0",
"@semantic-release/git": "^10.0.1",
"@semantic-release/github": "^11.0.0",
"@semantic-release/npm": "^12.0.1",
"@semantic-release/release-notes-generator": "^14.0.1",
"@types/file-saver": "^2.0.7",
"@types/node": "^22.8.1",
"@types/react": "^18.3.8",
"@types/react-dom": "^18.3.0",
"@types/uuid": "^10.0.0",
Expand Down
30 changes: 30 additions & 0 deletions release.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import { writeFileSync } from 'fs';

const generatePatchNotes = {
generateNotes: async (pluginConfig, context) => {
const { nextRelease } = context;
const patchNotes = {
version: nextRelease.version,
notes: nextRelease.notes,
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'],
plugins: [
'@semantic-release/commit-analyzer',
'@semantic-release/release-notes-generator',
['@semantic-release/npm', { npmPublish: false }],
'@semantic-release/github',
generatePatchNotes,
'@semantic-release/changelog',
['@semantic-release/git', { assets: ['CHANGELOG.md', 'package.json', 'public/patch-notes.json'] }],
],
};
Loading

0 comments on commit 19c58c3

Please sign in to comment.