From 9a7d95ad2da47529fc0fa6435c922ceff7ae82be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gerg=C5=91=20M=C3=B3ricz?= Date: Mon, 18 Aug 2025 19:33:25 +0200 Subject: [PATCH] archive js sdk --- .github/archive/publish-js-sdk.yml | 54 +++++++++++----------------- .github/workflows/publish-js-sdk.yml | 34 ------------------ 2 files changed, 21 insertions(+), 67 deletions(-) delete mode 100644 .github/workflows/publish-js-sdk.yml 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 + node-version: "20" + - name: Authenticate + run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc + - name: Publish 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 }} - 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