-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: ✨ Adicionado pop-up de patch notes
- Loading branch information
1 parent
cc5d03d
commit 5afe579
Showing
6 changed files
with
371 additions
and
11 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'] }], | ||
], | ||
}; |
Oops, something went wrong.