This commit is contained in:
phips28 2022-06-01 00:10:19 +02:00
parent b7d8fa3040
commit 5affbc8bdf
1 changed files with 3 additions and 0 deletions

View File

@ -182,6 +182,9 @@ const workspace = process.env.GITHUB_WORKSPACE;
console.log('current 2:', current, '/', 'version:', version);
console.log('execute npm version now with the new version:', version);
newVersion = execSync(`npm version --git-tag-version=false ${version}`).toString().trim().replace(/^v/, '');
// fix #166 - npm workspaces
// https://github.com/phips28/gh-action-bump-version/issues/166#issuecomment-1142640018
newVersion = newVersion.split(/\n/)[1] || newVersion;
console.log('newVersion 2:', newVersion);
newVersion = `${tagPrefix}${newVersion}`;
console.log(`newVersion after merging tagPrefix+newVersion: ${newVersion}`);