From e979b192b0124c33c84e703b6d218dd9817de140 Mon Sep 17 00:00:00 2001 From: Gaby Zifferman Date: Tue, 29 Oct 2024 19:27:40 +0100 Subject: [PATCH] chore: add logging for GITHUB_REF in release config for local testing --- release.config.cjs | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/release.config.cjs b/release.config.cjs index 30d1b0f90..04c467ff0 100644 --- a/release.config.cjs +++ b/release.config.cjs @@ -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', @@ -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'] }, ], [