Skip to content

Commit

Permalink
Update npm registry
Browse files Browse the repository at this point in the history
  • Loading branch information
luin committed Jan 16, 2024
1 parent c93dff2 commit a074cce
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion scripts/release.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ if (!process.env.CI) {
exitWithError('The script should only be run in CI');
}

exec(
`echo "//registry.npmjs.org/:_authToken=${process.env.NPM_TOKEN}" > ~/.npmrc`,
);

exec('git config --global user.name "Zihua Li"');
exec('git config --global user.email "[email protected]"');

Expand Down Expand Up @@ -117,7 +121,7 @@ fs.writeFileSync(
exec('git add CHANGELOG.md');
exec(`npm version ${version} -f`);

const pushCommand = 'git push --tags';
const pushCommand = `git push origin ${GITHUB_REF_NAME} --follow-tags`;
if (dryRun) {
console.log(`Skipping: "${pushCommand}" in dry-run mode`);
} else {
Expand Down

0 comments on commit a074cce

Please sign in to comment.