mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
ci: fix publish
This commit is contained in:
1 parent
f7af6093c8
commit
4d3501c611
3 files changed
+3
-2
No files matched your search
@@ -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"
|
||||||
+1
-1
@@ -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.');
|
||||||
|
|||||||
Reference in new issue
Block a user