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:
2020 # my-pkg -> my-pkg
2121 # @my-scope/my-pkg -> my-scope__my-pkg
2222 run : |
23- _n1="${{ steps.pkg.outputs.name }}"
23+ # 原始名称
24+ echo "N1=${{ steps.pkg.outputs.name }}" >> $GITHUB_ENV
2425 # 删除 @ 开头
25- _n2="${_n1 /@/}"
26+ echo "N2=${$N1 /@/}" >> $GITHUB_ENV
2627 # 将 / 替换为 __
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"
3031
3132 - name : 仓库类型是 npm
3233 if : inputs.type == 'npm'
5556 with :
5657 data : |
5758 {
58- "name": "@${{ steps.name.outputs.underscore }}"
59+ "name": "@${{ github.repository_owner }}/${{ steps.name.outputs.underscore }}"
5960 }
You can’t perform that action at this time.
0 commit comments