Skip to content

Supercharge your AI agents with data from the web and beyond. Building the library for superintelligence. 🔥

archive js sdk

Gergő Móricz9a7d95ad2da4
diff --git a/.github/archive/publish-js-sdk.yml b/.github/archive/publish-js-sdk.yml
index c02a654ff..88708b8a2 100644
--- a/.github/archive/publish-js-sdk.yml
+++ b/.github/archive/publish-js-sdk.yml
@@ -1,46 +1,34 @@
-name: Publish JavaScript SDK
+name: Publish JS SDK
-on: []
+on:
+ push:
+ branches:
+ - main
+ paths:
+ - apps/js-sdk/firecrawl/package.json
env:
- NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
+ TEST_API_KEY: ${{ secrets.TEST_API_KEY }}
jobs:
- build-and-publish:
+ publish:
+ name: Publish
runs-on: ubuntu-latest
-
steps:
- uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
- node-version: '20'
- registry-url: 'https://registry.npmjs.org/'
- scope: '@mendable'
- always-auth: true
-
- - name: Install pnpm
- run: npm install -g pnpm
-
- - name: Install python for running version check script
- run: |
- python -m pip install --upgrade pip
- pip install setuptools wheel requests packaging
-
- - name: Install dependencies for JavaScript SDK
- run: pnpm install
- working-directory: ./apps/js-sdk/firecrawl
-
- - name: Run version check script
- id: version_check_script
- run: |
- VERSION_INCREMENTED=$(python .github/scripts/check_version_has_incremented.py js ./apps/js-sdk/firecrawl @mendable/firecrawl-js)
- echo "VERSION_INCREMENTED=$VERSION_INCREMENTED" >> $GITHUB_ENV
-
- - name: Build and publish to npm
- if: ${{ env.VERSION_INCREMENTED == 'true' }}
- env:
- NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
+ node-version: "20"
+ - name: Authenticate
+ run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
+ - name: Publish
run: |
- npm run build-and-publish
+ npm install
+ npm run build
+ npm publish --access public
+ sed -i 's/"name": "@mendable\/firecrawl-js"/"name": "@mendable\/firecrawl"/g' package.json
+ npm publish --access public
+ sed -i 's/"name": "@mendable\/firecrawl"/"name": "firecrawl"/g' package.json
+ npm publish --access public
working-directory: ./apps/js-sdk/firecrawl
diff --git a/.github/workflows/publish-js-sdk.yml b/.github/workflows/publish-js-sdk.yml
deleted file mode 100644
index 88708b8a2..000000000
--- a/.github/workflows/publish-js-sdk.yml
+++ /dev/null
@@ -1,34 +0,0 @@
-name: Publish JS SDK
-
-on:
- push:
- branches:
- - main
- paths:
- - apps/js-sdk/firecrawl/package.json
-
-env:
- TEST_API_KEY: ${{ secrets.TEST_API_KEY }}
-
-jobs:
- publish:
- name: Publish
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v3
- - name: Set up Node.js
- uses: actions/setup-node@v3
- with:
- node-version: "20"
- - name: Authenticate
- run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
- - name: Publish
- run: |
- npm install
- npm run build
- npm publish --access public
- sed -i 's/"name": "@mendable\/firecrawl-js"/"name": "@mendable\/firecrawl"/g' package.json
- npm publish --access public
- sed -i 's/"name": "@mendable\/firecrawl"/"name": "firecrawl"/g' package.json
- npm publish --access public
- working-directory: ./apps/js-sdk/firecrawl