Skip to content

Commit

Permalink
Adding publish step in ci
Browse files Browse the repository at this point in the history
  • Loading branch information
ankush-cohere committed Jul 18, 2024
1 parent 73b44a2 commit 882d471
Showing 1 changed file with 24 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,27 @@ jobs:
working-directory: .
run: |
echo $COHERE_API_KEY
pytest -sv tests/test_compass_client.py
pytest -sv tests/test_compass_client.py
publish:
needs: [test_client]
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
runs-on: ubuntu-20.04
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Set up python
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Bootstrap poetry
run: |
curl -sSL https://install.python-poetry.org | python - -y --version 1.5.1
- name: Install dependencies
run: poetry install
- name: Publish to pypi
run: |
poetry config repositories.remote https://upload.pypi.org/legacy/
poetry --no-interaction -v publish --build --repository remote --username "$PYPI_USERNAME" --password "$PYPI_PASSWORD"
env:
PYPI_USERNAME: ${{ secrets.PYPI_USERNAME }}
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}

0 comments on commit 882d471

Please sign in to comment.