Skip to content

Commit

Permalink
enable npm publish integration
Browse files Browse the repository at this point in the history
  • Loading branch information
OrbintSoft committed Aug 14, 2022
1 parent 49a1419 commit 4c340a5
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions gulpfile.js/deploy.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,12 @@ async function publish() {
if (semver.gte(deployedVersion, currentVersion)) {
throw Error(`currentVersion ${currentVersion.raw} <= deployedVersion ${deployedVersion}`);
}
const npmToken = process.env.NPM_TOKEN;
console.log(npmToken);
await executeProcess('npm', [ 'pack' ]);
if (deployedVersion.prerelease[0] === 'rc' || currentVersion.prerelease[0] === 'rc') {
await executeProcess('npm', [ 'pack' ]);
await executeProcess('npm', [ 'publish' ]);
} else {
throw Error('Before releasing a stable version, an rc must be published and manually tested.');
}
}

exports.publish = publish;

0 comments on commit 4c340a5

Please sign in to comment.