0
v-firecrawl/.github/archive/publish-js-sdk.yml

47 lines
1.3 KiB
YAML
Raw Normal View History

2024-06-06 12:54:21 -04:00
name: Publish JavaScript SDK
2024-06-06 12:27:31 -04:00
2024-06-06 14:36:20 -04:00
on: []
2024-06-06 12:27:31 -04:00
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
jobs:
build-and-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
2024-06-06 12:54:21 -04:00
node-version: '20'
registry-url: 'https://registry.npmjs.org/'
scope: '@mendable'
always-auth: true
2024-06-06 12:27:31 -04:00
- 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 }}
run: |
2024-06-06 13:01:16 -04:00
npm run build-and-publish
2024-06-06 12:27:31 -04:00
working-directory: ./apps/js-sdk/firecrawl