Skip to content

Commit

Permalink
fix: 优化 actions 37
Browse files Browse the repository at this point in the history
  • Loading branch information
cloudcome committed Mar 17, 2023
1 parent d64f741 commit 9fcc50b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/actions/npm-publish/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ runs:
// @my-scope/my-pkg -> my-scope__my-pkg
const underlineName = pkg.name.replace(/@(.*)\/(.*)/, '$1__$2');
// @ref https://github.com/actions/toolkit/blob/457303960f03375db6f033e214b9f90d79c3fe5c/packages/github/src/context.ts
pkg.name = context.payload.repository.owner.login + '/' + underlineName;
const owner = context.payload.repository.owner.login;
pkg.name = '@' + owner + '/' + underlineName;
const fs = require('fs');
fs.writeFileSync('package.json', JSON.stringify(pkg), 'utf8');
Expand Down

0 comments on commit 9fcc50b

Please sign in to comment.