File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
.github/actions/npm-publish Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -20,13 +20,14 @@ runs:
20
20
# my-pkg -> my-pkg
21
21
# @my-scope/my-pkg -> my-scope__my-pkg
22
22
run : |
23
- _n1="${{ steps.pkg.outputs.name }}"
23
+ # 原始名称
24
+ echo "N1=${{ steps.pkg.outputs.name }}" >> $GITHUB_ENV
24
25
# 删除 @ 开头
25
- _n2="${_n1 /@/}"
26
+ echo "N2=${$N1 /@/}" >> $GITHUB_ENV
26
27
# 将 / 替换为 __
27
- _n3="${_n2 /\//__}"
28
- echo "origin=${{ _n1 }} " >> "$GITHUB_OUTPUT"
29
- echo "underscore=${{ _n3 }} " >> "$GITHUB_OUTPUT"
28
+ echo "N3=${N2 /\//__}" >> $GITHUB_ENV
29
+ echo "origin=$N1 " >> "$GITHUB_OUTPUT"
30
+ echo "underscore=$N3 " >> "$GITHUB_OUTPUT"
30
31
31
32
- name : 仓库类型是 npm
32
33
if : inputs.type == 'npm'
55
56
with :
56
57
data : |
57
58
{
58
- "name": "@${{ steps.name.outputs.underscore }}"
59
+ "name": "@${{ github.repository_owner }}/${{ steps.name.outputs.underscore }}"
59
60
}
You can’t perform that action at this time.
0 commit comments