ci: add defaults

This commit is contained in:
Leandro Costa 2025-06-27 13:05:30 -03:00
parent 31a8d5c5b5
commit 0ff0250ca6

View file

@ -10,10 +10,12 @@ inputs:
required: true
git_username:
description: user name that will hold the packages
required: true
required: false
default: leandro
git_url:
description: user name that will hold the packages
required: true
description: Git/Gitea/Forgejo server
required: false
default: git.lhprovedor.com.br
artifact_folder_name:
description: The Artifact to be downloaded
default: dist
@ -74,9 +76,10 @@ runs:
- name: Publish to Git Packages
shell: sh
run: |
echo "Git url: ${{ inputs.git_url }}"
echo "Git Username: ${{ inputs.git_username }}"
npm config set registry https://git.lhprovedor.com.br/api/packages/${{ inputs.git_username }}/npm/
npm config set -- '//git.lhprovedor.com.br/api/packages/${{ inputs.git_username }}/npm/:_authToken' "${{ inputs.git_token }}"
npm config set registry https://${{ inputs.git_url }}/api/packages/${{ inputs.git_username }}/npm/
npm config set -- '//${{ inputs.git_url }}/api/packages/${{ inputs.git_username }}/npm/:_authToken' "${{ inputs.git_token }}"
cd dist
if npm view "${PACKAGE_NAME}@${PACKAGE_VERSION}" > /dev/null 2>&1; then