diff --git a/npm/npm-push/action.yaml b/npm/npm-push/action.yaml index cfd7212..5b5aceb 100644 --- a/npm/npm-push/action.yaml +++ b/npm/npm-push/action.yaml @@ -33,23 +33,15 @@ runs: # Trim whitespace TGZ_PATH=$(echo "$TGZ_PATH" | xargs) - echo "Original path: '${{ inputs.tgz }}'" - echo "Trimmed path: '$TGZ_PATH'" - echo "First character: '${TGZ_PATH:0:1}'" - if [[ ! "$TGZ_PATH" =~ ^[./~] ]]; then echo "Path does not start with . / or ~, adding ./ prefix" TGZ_PATH="./$TGZ_PATH" - else - echo "Path already starts with . / or ~, no prefix needed" fi - echo "Final path: '$TGZ_PATH'" - # Configure npm authentication for the registry (scoped to project) REGISTRY_PATH=$(echo "${{ inputs.registry }}" | sed -E 's|https?://||') npm config set --location=project registry "${{ inputs.registry }}" - npm config set --location=project "//${REGISTRY_PATH}:_apiKey" "${{ inputs.apiKey }}" + npm config set --location=project "//${REGISTRY_PATH}:_authToken" "${{ inputs.apiKey }}" echo "Publishing $TGZ_PATH to ${{ inputs.registry }}" npm publish --location=project "$TGZ_PATH" --access ${{ inputs.access }}