fix publish: mkdir npm dirs before artifacts, add skip-gh-release

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Abimael Martell
2026-04-02 11:49:39 -07:00
co-authored by Claude Opus 4.6
parent 4ec9ac0f5c
commit a1c62eb24e
+11 -4
View File
@@ -78,14 +78,21 @@ jobs:
- name: Prepare and publish
working-directory: napi
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
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
# Create platform package dirs expected by napi artifacts
mkdir -p npm/linux-x64-gnu npm/darwin-arm64
# Move binaries into platform dirs
bunx napi artifacts --build-output-dir artifacts
# Generate platform package.json files
bunx napi prepublish -t npm --skip-gh-release
echo "=== Package contents ==="
ls -R npm/
@@ -93,8 +100,8 @@ jobs:
for dir in npm/*/; do
if [ -f "$dir/package.json" ]; then
echo "Publishing $dir"
(cd "$dir" && npm publish --access public)
(cd "$dir" && npm publish --access public) || true
fi
done
echo "Publishing main package"
npm publish --access public
npm publish --access public || true