Skip to content

Commit

Permalink
chore: (config) add conditional changelog generation for main branch …
Browse files Browse the repository at this point in the history
…only
  • Loading branch information
gabyzif committed Oct 29, 2024
1 parent 6a04627 commit 28fe95b
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions release.config.cjs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
const isMainBranch = process.env.GITHUB_REF === 'refs/heads/main';

module.exports = {
branches: [
'main',
Expand Down Expand Up @@ -44,13 +46,14 @@ module.exports = {
preset: 'angular',
},
],
[
'@semantic-release/changelog',
{
changelogFile: 'CHANGELOG.md',
branches: ['main']
},
],
...(isMainBranch ? [
[
'@semantic-release/changelog',
{
changelogFile: 'CHANGELOG.md',
},
],
] : []),
['@semantic-release/npm'],
[
'@semantic-release/github',
Expand Down

0 comments on commit 28fe95b

Please sign in to comment.