ci: fix publish

pull/148/head
undefined 3 years ago
parent f7af6093c8
commit 4d3501c611

@ -24,7 +24,7 @@ jobs:
node-version: 14.x node-version: 14.x
- name: Config - name: Config
run: | 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.name undefined
git config --global user.email i@undefined.moe git config --global user.email i@undefined.moe
- name: Install - name: Install

@ -8,3 +8,4 @@ plugins:
spec: "@yarnpkg/plugin-interactive-tools" spec: "@yarnpkg/plugin-interactive-tools"
nodeLinker: node-modules nodeLinker: node-modules
yarnPath: .yarn/releases/yarn-berry.js yarnPath: .yarn/releases/yarn-berry.js
npmPublishAccess: "public"

@ -54,7 +54,7 @@ if (CI && (!tag || GITHUB_EVENT_NAME !== 'push')) {
if (Object.keys(bumpMap).length) { if (Object.keys(bumpMap).length) {
for (const name in bumpMap) { for (const name in bumpMap) {
console.log(`publishing ${name}@${bumpMap[name]} ...`); 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.'); console.log('Release created successfully.');

Loading…
Cancel
Save