Skip to content

Commit

Permalink
fix: let github registry use global npmrc
Browse files Browse the repository at this point in the history
  • Loading branch information
antongolub committed Jul 21, 2022
1 parent 8afb3b6 commit 4f2a990
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions release.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,6 @@ ${commits.join('\n')}`).join('\n')
_npmrc = path.resolve(fs.realpathSync(os.tmpdir()), 'zx-semrel', Math.random().toString(36).substring(2), '.npmrc')
fs.outputFileSync(_npmrc, `
//registry.npmjs.org/:_authToken=${NPM_TOKEN}
//npm.pkg.github.com/:_authToken=${GITHUB_TOKEN}
`)
return _npmrc
})()
Expand All @@ -160,7 +159,7 @@ ${commits.join('\n')}`).join('\n')

console.log(`npm publish @${repoName} to https://npm.pkg.github.com`)
await $`echo "\`jq '.name="@${repoName}"' package.json\`" > package.json`
await $`npm publish --no-git-tag-version --registry=https://npm.pkg.github.com --userconfig ${npmrc}`
await $`npm publish --no-git-tag-version --registry=https://npm.pkg.github.com`
}

console.log(chalk.bold('Great success!'))
Expand Down

0 comments on commit 4f2a990

Please sign in to comment.