Skip to content

Commit

Permalink
chore: add logging for GITHUB_REF in release config for local testing
Browse files Browse the repository at this point in the history
  • Loading branch information
gabyzif committed Oct 29, 2024
1 parent 167f335 commit e979b19
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions release.config.cjs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
const isMainBranch = process.env.GITHUB_REF === 'refs/heads/main';
console.log("Is main branch:", isMainBranch);
console.log("Is main branch:", process.env); // This will output true or false based on the branch

module.exports = {
branches: [
'main',
Expand Down Expand Up @@ -44,18 +48,19 @@ 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',
{
assets: ['dist/**'],
assets: ['dist/aquarium.umd.cjs', 'dist/aquarium.js', 'dist/style.css', 'dist/index.d.ts']
},
],
[
Expand Down

0 comments on commit e979b19

Please sign in to comment.