Skip to content

Commit 119a0b3

Browse files
committed
workflow: use explicit registry when publishing
1 parent a1ee8b7 commit 119a0b3

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

.github/workflows/publish-commit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,6 @@ jobs:
3434
- name: Build and publish
3535
id: publish
3636
run: |
37-
pnpm release 0.0.0-${{ github.event.workflow_run.head_commit }} --tag ${{ github.event.workflow_run.head_branch }} --publishOnly
37+
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
3838
env:
3939
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

scripts/release.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ const { values: args, positionals } = parseArgs({
5858
publishOnly: {
5959
type: 'boolean',
6060
},
61+
registry: {
62+
type: 'string',
63+
},
6164
},
6265
})
6366

@@ -545,6 +548,7 @@ async function publishPackage(pkgName, version, additionalFlags) {
545548
...(releaseTag ? ['--tag', releaseTag] : []),
546549
'--access',
547550
'public',
551+
...(args.registry ? ['--registry', args.registry] : []),
548552
...additionalFlags,
549553
],
550554
{

0 commit comments

Comments
 (0)