Fixed path.

This commit is contained in:
2026-01-01 19:01:22 -08:00
parent 9938ed79e4
commit 8010f88b94

View File

@@ -31,7 +31,12 @@ runs:
env:
NODE_AUTH_TOKEN: ${{ inputs.apiKey }}
run: |
echo "Publishing ${{ inputs.tgz }} to ${{ inputs.registry }}"
npm publish ${{ inputs.tgz }} --registry ${{ inputs.registry }} --access ${{ inputs.access }}
# Ensure path starts with ./ so npm recognizes it as a file path
TGZ_PATH="${{ inputs.tgz }}"
if [[ ! "$TGZ_PATH" =~ ^[./~] ]]; then
TGZ_PATH="./$TGZ_PATH"
fi
echo "Publishing $TGZ_PATH to ${{ inputs.registry }}"
npm publish "$TGZ_PATH" --registry ${{ inputs.registry }} --access ${{ inputs.access }}
echo "Package published successfully"
shell: bash