]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
workflow: use explicit registry when publishing
authorEvan You <evan@vuejs.org>
Sun, 11 Aug 2024 23:05:06 +0000 (07:05 +0800)
committerEvan You <evan@vuejs.org>
Sun, 11 Aug 2024 23:11:17 +0000 (07:11 +0800)
.github/workflows/publish-commit.yml
scripts/release.js

index 9626a9a6080f3c2d02bf852256f714dd6aa38bc7..3b9212309d813d993376227ea69626f2536453b1 100644 (file)
@@ -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 }}
index 398cfbdefa6fd8e1c39a8b7fe6c2bc37082fdd50..7082b25ce884007ecac6f134cce5092846297553 100644 (file)
@@ -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,
       ],
       {