This commit is contained in:
2026-01-01 19:39:10 -08:00
parent 7d9be5bf77
commit 38ec9914de

View File

@@ -35,9 +35,9 @@ runs:
fi fi
# Configure npm authentication for the registry (scoped to project) # Configure npm authentication for the registry (scoped to project)
REGISTRY_HOST=$(echo "${{ inputs.registry }}" | sed -E 's|https?://([^/]+).*|\1|') REGISTRY_PATH=$(echo "${{ inputs.registry }}" | sed -E 's|https?://||')
npm config set --location=project "//${REGISTRY_HOST}/:_authToken" "${{ inputs.apiKey }}"
npm config set --location=project registry "${{ inputs.registry }}" 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 }}" echo "Publishing $TGZ_PATH to ${{ inputs.registry }}"
npm publish "$TGZ_PATH" --access ${{ inputs.access }} npm publish "$TGZ_PATH" --access ${{ inputs.access }}