added to ci/cd
This commit is contained in:
parent
f5cfd1aea2
commit
a1f3b9fccd
|
@ -42,5 +42,5 @@ jobs:
|
||||||
env:
|
env:
|
||||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
npm run build-and-publish
|
bash ./build_and_publish.sh
|
||||||
working-directory: ./apps/js-sdk/firecrawl
|
working-directory: ./apps/js-sdk/firecrawl
|
||||||
|
|
|
@ -30,18 +30,12 @@ jobs:
|
||||||
VERSION_INCREMENTED=$(python .github/scripts/check_version_has_incremented.py python ./apps/python-sdk/firecrawl firecrawl-py)
|
VERSION_INCREMENTED=$(python .github/scripts/check_version_has_incremented.py python ./apps/python-sdk/firecrawl firecrawl-py)
|
||||||
echo "VERSION_INCREMENTED=$VERSION_INCREMENTED" >> $GITHUB_ENV
|
echo "VERSION_INCREMENTED=$VERSION_INCREMENTED" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Build the package
|
- name: Build and Publish to PyPI
|
||||||
if: ${{ env.VERSION_INCREMENTED == 'true' }}
|
|
||||||
run: |
|
|
||||||
python -m build
|
|
||||||
working-directory: ./apps/python-sdk
|
|
||||||
|
|
||||||
- name: Publish to PyPI
|
|
||||||
if: ${{ env.VERSION_INCREMENTED == 'true' }}
|
if: ${{ env.VERSION_INCREMENTED == 'true' }}
|
||||||
env:
|
env:
|
||||||
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
|
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
|
||||||
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
|
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
|
||||||
run: |
|
run: |
|
||||||
twine upload dist/*
|
bash ./build_and_publish.sh
|
||||||
working-directory: ./apps/python-sdk
|
working-directory: ./apps/python-sdk
|
||||||
|
|
||||||
|
|
|
@ -207,19 +207,13 @@ jobs:
|
||||||
PYTHON_SDK_VERSION_INCREMENTED=$(python .github/scripts/check_version_has_incremented.py python ./apps/python-sdk/firecrawl firecrawl-py)
|
PYTHON_SDK_VERSION_INCREMENTED=$(python .github/scripts/check_version_has_incremented.py python ./apps/python-sdk/firecrawl firecrawl-py)
|
||||||
echo "PYTHON_SDK_VERSION_INCREMENTED=$PYTHON_SDK_VERSION_INCREMENTED" >> $GITHUB_ENV
|
echo "PYTHON_SDK_VERSION_INCREMENTED=$PYTHON_SDK_VERSION_INCREMENTED" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Build the package
|
- name: Build and Publish to PyPI
|
||||||
if: ${{ env.PYTHON_SDK_VERSION_INCREMENTED == 'true' }}
|
|
||||||
run: |
|
|
||||||
python -m build
|
|
||||||
working-directory: ./apps/python-sdk
|
|
||||||
|
|
||||||
- name: Publish to PyPI
|
|
||||||
if: ${{ env.PYTHON_SDK_VERSION_INCREMENTED == 'true' }}
|
if: ${{ env.PYTHON_SDK_VERSION_INCREMENTED == 'true' }}
|
||||||
env:
|
env:
|
||||||
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
|
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
|
||||||
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
|
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
|
||||||
run: |
|
run: |
|
||||||
twine upload dist/*
|
bash ./build_and_publish.sh
|
||||||
working-directory: ./apps/python-sdk
|
working-directory: ./apps/python-sdk
|
||||||
|
|
||||||
build-and-publish-js-sdk:
|
build-and-publish-js-sdk:
|
||||||
|
@ -260,6 +254,6 @@ jobs:
|
||||||
env:
|
env:
|
||||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
npm run build-and-publish
|
bash ./build_and_publish.sh
|
||||||
working-directory: ./apps/js-sdk/firecrawl
|
working-directory: ./apps/js-sdk/firecrawl
|
||||||
|
|
|
@ -19,6 +19,9 @@ function build_and_publish {
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Wait for a moment to ensure npm publish has processed
|
||||||
|
sleep 10
|
||||||
|
|
||||||
# Revert the changes to the original placeholder in package.json
|
# Revert the changes to the original placeholder in package.json
|
||||||
jq '.name = "PLACEHOLDER_NAME"' package.json > temp.json && mv temp.json package.json
|
jq '.name = "PLACEHOLDER_NAME"' package.json > temp.json && mv temp.json package.json
|
||||||
|
|
||||||
|
@ -31,4 +34,4 @@ function build_and_publish {
|
||||||
build_and_publish "@mendable/firecrawl-js"
|
build_and_publish "@mendable/firecrawl-js"
|
||||||
|
|
||||||
# Build and publish the second package to npm
|
# Build and publish the second package to npm
|
||||||
build_and_publish "firecrawl"
|
build_and_publish "firecrawl"
|
Loading…
Reference in New Issue