Skip to content

Commit 1a94943

Browse files
committed
fix: resolve npm publishing issues with tarball path handling
- Fix wildcard expansion issue in npm publish command - Properly quote tarball path to prevent git URL interpretation - Add better error reporting for tarball discovery - This should resolve versions 1.21.0+ not appearing on npmjs.com
1 parent c73b5bb commit 1a94943

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

.github/workflows/main.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -455,12 +455,14 @@ jobs:
455455
run: |
456456
echo "📦 Publishing to NPM registry..."
457457
458-
# Check if we have a tarball to publish
459-
if [ -f "dist/markmv-"*.tgz ]; then
460-
echo "✅ Found tarball: $(ls dist/markmv-*.tgz)"
458+
# Find the tarball file created by semantic-release
459+
TARBALL=$(ls dist/markmv-*.tgz 2>/dev/null | head -1)
460+
461+
if [ -n "$TARBALL" ] && [ -f "$TARBALL" ]; then
462+
echo "✅ Found tarball: $TARBALL"
461463
462464
# Publish with provenance
463-
npm publish dist/markmv-*.tgz --provenance --access public
465+
npm publish "$TARBALL" --provenance --access public
464466
465467
if [ $? -eq 0 ]; then
466468
echo "✅ Successfully published to NPM"
@@ -469,6 +471,7 @@ jobs:
469471
fi
470472
else
471473
echo "❌ No tarball found for NPM publishing"
474+
echo "📁 Contents of dist directory:"
472475
ls -la dist/ || echo "No dist directory"
473476
fi
474477

0 commit comments

Comments
 (0)