diff --git a/npm/npm-push/action.yaml b/npm/npm-push/action.yaml index ff00b92..302297f 100644 --- a/npm/npm-push/action.yaml +++ b/npm/npm-push/action.yaml @@ -35,9 +35,9 @@ runs: fi # Configure npm authentication for the registry (scoped to project) - REGISTRY_HOST=$(echo "${{ inputs.registry }}" | sed -E 's|https?://([^/]+).*|\1|') - npm config set --location=project "//${REGISTRY_HOST}/:_authToken" "${{ inputs.apiKey }}" + REGISTRY_PATH=$(echo "${{ inputs.registry }}" | sed -E 's|https?://||') npm config set --location=project registry "${{ inputs.registry }}" + npm config set --location=project "//${REGISTRY_PATH}:_authToken" "${{ inputs.apiKey }}" echo "Publishing $TGZ_PATH to ${{ inputs.registry }}" npm publish "$TGZ_PATH" --access ${{ inputs.access }}