Update npm/publish/action.yaml

This commit is contained in:
Zakary Timson 2024-04-28 03:45:29 +00:00
parent 8839455ea7
commit 0480832df9

View File

@ -22,6 +22,11 @@ inputs:
required: false required: false
description: Only publish for branch description: Only publish for branch
default: develop default: develop
working-directory:
type: string
requried: false
description: Run from path
default: .
runs: runs:
using: composite using: composite
@ -30,4 +35,4 @@ runs:
if: ${{github.ref_name}} == ${{inputs.branch}} if: ${{github.ref_name}} == ${{inputs.branch}}
uses: docker://node uses: docker://node
with: with:
args: /bin/bash -c 'npm set registry ${{inputs.registry}} && npm set $(echo ${{inputs.registry}} | sed s%http:%% | sed s%https:%% ):_authToken "${{inputs.token}}" && npm publish || echo Already published...' args: /bin/bash -c 'cd ${{inputs.working-directory}} && npm set registry ${{inputs.registry}} && npm set $(echo ${{inputs.registry}} | sed s%http:%% | sed s%https:%% ):_authToken "${{inputs.token}}" && npm publish || echo Already published...'