Update npm/publish/action.yaml
This commit is contained in:
parent
8d3574ca58
commit
723a0f67dd
@ -1,33 +1,33 @@
|
|||||||
name: NPM Publish
|
name: NPM Publish
|
||||||
description: Push to registry
|
description: Push to registry
|
||||||
|
|
||||||
inputs:
|
inputs:
|
||||||
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:
|
registry:
|
||||||
type: string
|
type: string
|
||||||
required: false
|
required: false
|
||||||
description: NPM registry FQDM
|
description: NPM registry FQDM
|
||||||
default: ${{github.server_url}}/api/packages/${{inputs.owner}}/npm/
|
default: ${{github.server_url}}/api/packages/${{inputs.owner}}/npm/
|
||||||
token:
|
token:
|
||||||
type: string
|
type: string
|
||||||
required: false
|
required: false
|
||||||
description: Access Token
|
description: Access Token
|
||||||
default: ${{secrets.DEPLOY_TOKEN}}
|
default: ${{secrets.DEPLOY_TOKEN}}
|
||||||
branch:
|
branch:
|
||||||
type: string
|
type: string
|
||||||
required: false
|
required: false
|
||||||
description: Only publish for branch
|
description: Only publish for branch
|
||||||
default: develop
|
default: develop
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
using: composite
|
using: composite
|
||||||
steps:
|
steps:
|
||||||
- name: Publish
|
- name: Publish
|
||||||
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 config set registry ${{inputs.registry}} && npm config set -- $(echo ${{inputs.registry}} | sed s%http:%% | sed s%https:%% ):_authToken "${{inputs.token}}" && npm publish || echo Already published...'
|
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...'
|
||||||
|
Loading…
Reference in New Issue
Block a user