Skip to content

Commit 95d7281

Browse files
authored
Correct npmrc (#72)
* Correct npmrc * Add newline * Move login to CI step
1 parent 23a0bd3 commit 95d7281

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ jobs:
3535
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
3636
restore-keys: |
3737
${{ runner.os }}-pnpm-store-
38-
38+
- name: Set deployment token
39+
run: pnpm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
3940
- name: Publish
4041
run: |
4142
pnpm install --no-frozen-lockfile

.npmrc

Lines changed: 0 additions & 1 deletion
This file was deleted.

scripts/publish.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -557,12 +557,13 @@ async function run() {
557557
// Publish each package
558558
changedPackages.map((pkg) => {
559559
const packageDir = path.join(rootDir, 'packages', pkg.packageDir)
560-
const cmd = `npm login && cd ${packageDir} && npm publish --tag ${npmTag} --access=public --no-git-checks`
560+
const cmd = `cd ${packageDir} && npm publish --tag ${npmTag} --access=public --no-git-checks`
561561
console.info(
562562
` Publishing ${pkg.name}@${version} to npm with tag "${npmTag}"...`,
563563
)
564564

565-
execSync(`${cmd} --token ${process.env.NPM_TOKEN}`)
565+
// execSync(`${cmd} --token ${process.env.NPM_TOKEN}`)
566+
execSync(cmd)
566567
})
567568

568569
console.info()

0 commit comments

Comments
 (0)