Skip to content

Commit ae10697

Browse files
committed
fix: 优化 actions 35
1 parent 23b1367 commit ae10697

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
@@ -38,7 +38,8 @@ runs:
3838
// my-pkg -> my-pkg
3939
// @my-scope/my-pkg -> my-scope__my-pkg
4040
const underlineName = pkg.name.replace(/@(.*)\/(.*)/, '$1__$2');
41-
pkg.name = github.repository_owner + '/' + underlineName;
41+
// @ref https://github.com/actions/toolkit/blob/457303960f03375db6f033e214b9f90d79c3fe5c/packages/github/src/context.ts
42+
pkg.name = context.payload.repository.owner.login + '/' + underlineName;
4243
const fs = require('fs');
4344
fs.writeFileSync('package.json', JSON.stringify(pkg));
4445

0 commit comments

Comments
 (0)