36 lines
857 B
YAML
36 lines
857 B
YAML
name: NPM Publish
|
|
description: Push to registry
|
|
|
|
inputs:
|
|
registry:
|
|
type: string
|
|
required: false
|
|
description: NPM registry FQDM
|
|
default: ${{github.server_url}}
|
|
owner:
|
|
type: string
|
|
required: false
|
|
description: Owner to publish to
|
|
default: ${{github.repository_owner}}
|
|
token:
|
|
type: string
|
|
required: false
|
|
description: Access Token
|
|
default: ${{secrets.DEPLOY_TOKEN}}
|
|
|
|
runs:
|
|
using: composite
|
|
steps:
|
|
- name: Setup registry
|
|
run: |
|
|
if [ "${{github.ref_name}}" == "develop" ]; then
|
|
echo "_authToken=${{inputs.token}}" > .npmrc
|
|
echo "registry=${{inputs.registry}}/api/packages/${{inputs.owner}}/npm/" >> .npmrc
|
|
fi
|
|
shell: sh
|
|
|
|
- name: Publish
|
|
uses: docker://node
|
|
with:
|
|
args: /bin/sh -c "npm publish"
|