From 4ec9ac0f5c5f9b8afad0e4728be7414607973bc8 Mon Sep 17 00:00:00 2001 From: Abimael Martell Date: Thu, 2 Apr 2026 11:39:39 -0700 Subject: [PATCH] fix publish: run prepublish before artifacts to create npm dirs Co-Authored-By: Claude Opus 4.6 (1M context) --- .github/workflows/publish.yml | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 4019ecf..3fc5e64 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -76,24 +76,25 @@ jobs: with: path: napi/artifacts - - name: Move artifacts - working-directory: napi - run: bunx napi artifacts --build-output-dir artifacts - - - name: List packages - working-directory: napi - run: ls -R npm/ - - - name: Publish + - name: Prepare and publish working-directory: napi run: | echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" > .npmrc echo "@firecrawl:registry=https://npm.pkg.github.com" >> .npmrc + + # Create platform package dirs and move binaries bunx napi prepublish -t npm - npm publish --access public + bunx napi artifacts --build-output-dir artifacts + + echo "=== Package contents ===" + ls -R npm/ + + # Publish platform packages first, then main package for dir in npm/*/; do if [ -f "$dir/package.json" ]; then echo "Publishing $dir" (cd "$dir" && npm publish --access public) fi done + echo "Publishing main package" + npm publish --access public