We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents d93b616 + 23b1367 commit 99f27dcCopy full SHA for 99f27dc
.github/actions/npm-publish/action.yml
@@ -34,8 +34,11 @@ runs:
34
result-encoding: string
35
script: |
36
const pkg = require('./package.json');
37
- const safeName = pkg.name.replace(/@(.*)\/(.*)/, '$1__$2');
38
- pkg.name = github.repository_owner + '/' + steps.naming.outputs.replaced;
+ // originName -> underlineName
+ // my-pkg -> my-pkg
39
+ // @my-scope/my-pkg -> my-scope__my-pkg
40
+ const underlineName = pkg.name.replace(/@(.*)\/(.*)/, '$1__$2');
41
+ pkg.name = github.repository_owner + '/' + underlineName;
42
const fs = require('fs');
43
fs.writeFileSync('package.json', JSON.stringify(pkg));
44
0 commit comments