Update npm/publish/action.yaml

This commit is contained in:
Zakary Timson 2023-12-15 04:09:00 +00:00
parent ee204edc72
commit af561ad3e6

View File

@ -2,16 +2,16 @@ name: NPM Publish
description: Push to registry description: Push to registry
inputs: inputs:
registry:
type: string
required: false
description: NPM registry FQDM
default: ${{github.server_url}}
owner: owner:
type: string type: string
required: false required: false
description: Owner to publish to description: Owner to publish to
default: ${{github.repository_owner}} default: ${{github.repository_owner}}
registry:
type: string
required: false
description: NPM registry FQDM
default: ${{github.server_url}}/api/packages/${{inputs.owner}}/npm/
token: token:
type: string type: string
required: false required: false
@ -31,7 +31,7 @@ runs:
if [ "${{github.ref_name}}" == "${{inputs.branch}}" ]; then if [ "${{github.ref_name}}" == "${{inputs.branch}}" ]; then
TRIMMED=$(echo "${{inputs.registry}}" | sed s%http:%% | sed s%https:%%) TRIMMED=$(echo "${{inputs.registry}}" | sed s%http:%% | sed s%https:%%)
echo "_authToken=${{inputs.token}}" > .npmrc echo "_authToken=${{inputs.token}}" > .npmrc
echo "registry=$TRIMMED/api/packages/${{inputs.owner}}/npm/" >> .npmrc echo "registry=${{inputs.registry}}" >> .npmrc
fi fi
shell: sh shell: sh