Skip to content

Commit 9fcc50b

Browse files
committed
fix: 优化 actions 37
1 parent d64f741 commit 9fcc50b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

.github/actions/npm-publish/action.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ runs:
3939
// @my-scope/my-pkg -> my-scope__my-pkg
4040
const underlineName = pkg.name.replace(/@(.*)\/(.*)/, '$1__$2');
4141
// @ref https://github.com/actions/toolkit/blob/457303960f03375db6f033e214b9f90d79c3fe5c/packages/github/src/context.ts
42-
pkg.name = context.payload.repository.owner.login + '/' + underlineName;
42+
const owner = context.payload.repository.owner.login;
43+
pkg.name = '@' + owner + '/' + underlineName;
4344
const fs = require('fs');
4445
fs.writeFileSync('package.json', JSON.stringify(pkg), 'utf8');
4546

0 commit comments

Comments
 (0)