From: Evan You Date: Sun, 11 Aug 2024 23:05:06 +0000 (+0800) Subject: workflow: use explicit registry when publishing X-Git-Tag: v3.5.0-beta.2~30 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=119a0b38322196893b652434a0a86461ead813ad;p=thirdparty%2Fvuejs%2Fcore.git workflow: use explicit registry when publishing --- diff --git a/.github/workflows/publish-commit.yml b/.github/workflows/publish-commit.yml index 9626a9a608..3b9212309d 100644 --- a/.github/workflows/publish-commit.yml +++ b/.github/workflows/publish-commit.yml @@ -34,6 +34,6 @@ jobs: - name: Build and publish id: publish run: | - pnpm release 0.0.0-${{ github.event.workflow_run.head_commit }} --tag ${{ github.event.workflow_run.head_branch }} --publishOnly + pnpm release 0.0.0-${{ github.event.workflow_run.head_commit.id }} --tag ${{ github.event.workflow_run.head_branch }} --registry https://npm.pkg.github.com --publishOnly env: NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/scripts/release.js b/scripts/release.js index 398cfbdefa..7082b25ce8 100644 --- a/scripts/release.js +++ b/scripts/release.js @@ -58,6 +58,9 @@ const { values: args, positionals } = parseArgs({ publishOnly: { type: 'boolean', }, + registry: { + type: 'string', + }, }, }) @@ -545,6 +548,7 @@ async function publishPackage(pkgName, version, additionalFlags) { ...(releaseTag ? ['--tag', releaseTag] : []), '--access', 'public', + ...(args.registry ? ['--registry', args.registry] : []), ...additionalFlags, ], {