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 Oct 10, 2024
1 parent ea312b3 commit 5dc1b56
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 2 deletions.
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.9
- 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 }}
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "compass-sdk"
version = "0.1.0"
version = "1.0.0"
authors = []
description = "Compass SDK"

Expand Down

0 comments on commit 5dc1b56

Please sign in to comment.