diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3b1871dc3..b30a0cd5a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -24,7 +24,7 @@ jobs: node-version: 14.x - name: Config run: | - echo "//registry.npmjs.org/:_authToken=${{secrets.NPM_TOKEN}}" > .npmrc + echo "npmAuthToken: ${{secrets.NPM_TOKEN}}" >> .yarnrc.yml git config --global user.name undefined git config --global user.email i@undefined.moe - name: Install diff --git a/.yarnrc.yml b/.yarnrc.yml index aa82320b6..61ee49085 100644 --- a/.yarnrc.yml +++ b/.yarnrc.yml @@ -8,3 +8,4 @@ plugins: spec: "@yarnpkg/plugin-interactive-tools" nodeLinker: node-modules yarnPath: .yarn/releases/yarn-berry.js +npmPublishAccess: "public" diff --git a/build/publish.js b/build/publish.js index 8701d0ee9..155587978 100644 --- a/build/publish.js +++ b/build/publish.js @@ -54,7 +54,7 @@ if (CI && (!tag || GITHUB_EVENT_NAME !== 'push')) { if (Object.keys(bumpMap).length) { for (const name in bumpMap) { console.log(`publishing ${name}@${bumpMap[name]} ...`); - await spawnAsync(`yarn publish ${name} --new-version ${bumpMap[name]}${tag === 'dev' ? '-dev' : ''} --access public --tag ${tag}`); + await spawnAsync(`yarn npm publish ${name} --new-version ${bumpMap[name]}${tag === 'dev' ? '-dev' : ''} --access public --tag ${tag}`); } } console.log('Release created successfully.');