forked from phoenix/litellm-mirror
Update config.yml
This commit is contained in:
parent
9d6cfbf602
commit
bccf9950c5
1 changed files with 18 additions and 23 deletions
|
@ -6,8 +6,6 @@ jobs:
|
||||||
working_directory: ~/project
|
working_directory: ~/project
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
|
||||||
|
|
||||||
# Install dependencies from requirements.txt
|
# Install dependencies from requirements.txt
|
||||||
- run:
|
- run:
|
||||||
name: Install Dependencies
|
name: Install Dependencies
|
||||||
|
@ -33,37 +31,34 @@ jobs:
|
||||||
environment:
|
environment:
|
||||||
PYPI_API_TOKEN: $PYPI_API_TOKEN # Use the environment variable in the job
|
PYPI_API_TOKEN: $PYPI_API_TOKEN # Use the environment variable in the job
|
||||||
|
|
||||||
steps:
|
|
||||||
- checkout
|
|
||||||
|
|
||||||
# Publish to PyPI using the environment variable
|
|
||||||
- run:
|
|
||||||
name: Publish to PyPI
|
|
||||||
command: |
|
|
||||||
echo "Creating a PyPI token file..."
|
|
||||||
echo -e "[pypi]\nusername = __token__\npassword = $PYPI_API_TOKEN" > ~/.pypirc
|
|
||||||
python setup.py sdist
|
|
||||||
python -m pip install --upgrade twine
|
|
||||||
twine upload dist/*
|
|
||||||
|
|
||||||
workflows:
|
|
||||||
version: 2
|
|
||||||
build_and_test:
|
|
||||||
jobs:
|
|
||||||
- local_testing
|
|
||||||
- publish_to_pypi:
|
|
||||||
filters:
|
|
||||||
branches:
|
|
||||||
only:
|
|
||||||
- main
|
|
||||||
steps:
|
steps:
|
||||||
# Check if setup.py is modified and publish to PyPI
|
# Check if setup.py is modified and publish to PyPI
|
||||||
- run:
|
- run:
|
||||||
name: Check setup.py modification
|
name: Check setup.py modification
|
||||||
command: |
|
command: |
|
||||||
if [ -n "$(git diff --name-only $CIRCLE_SHA1^..$CIRCLE_SHA1 | grep 'setup.py')" ]; then
|
if [ -n "$(git diff --name-only $CIRCLE_SHA1^..$CIRCLE_SHA1 | grep 'setup.py')" ]; then
|
||||||
echo "Publishing to PyPI..."
|
echo "Creating a PyPI token file..."
|
||||||
|
echo -e "[pypi]\nusername = __token__\npassword = $PYPI_API_TOKEN" > ~/.pypirc
|
||||||
|
python setup.py sdist
|
||||||
|
python -m pip install --upgrade twine
|
||||||
|
twine upload dist/*
|
||||||
else
|
else
|
||||||
echo "No changes to setup.py. Skipping PyPI publish."
|
echo "No changes to setup.py. Skipping PyPI publish."
|
||||||
circleci step halt
|
circleci step halt
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
workflows:
|
||||||
|
version: 2
|
||||||
|
build_and_test:
|
||||||
|
jobs:
|
||||||
|
- local_testing:
|
||||||
|
filters:
|
||||||
|
branches:
|
||||||
|
ignore:
|
||||||
|
- main
|
||||||
|
|
||||||
|
- publish_to_pypi:
|
||||||
|
filters:
|
||||||
|
branches:
|
||||||
|
only:
|
||||||
|
- main
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue