Skip to content

Commit 5dc1b56

Browse files
committed
Adding publish step in ci
1 parent ea312b3 commit 5dc1b56

File tree

2 files changed

+25
-2
lines changed

2 files changed

+25
-2
lines changed

.github/workflows/test.yml renamed to .github/workflows/test_publish.yml

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,27 @@ jobs:
6060
working-directory: .
6161
run: |
6262
echo $COHERE_API_KEY
63-
pytest -sv tests/test_compass_client.py
63+
pytest -sv tests/test_compass_client.py
64+
publish:
65+
needs: [test_client]
66+
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
67+
runs-on: ubuntu-20.04
68+
steps:
69+
- name: Checkout repo
70+
uses: actions/checkout@v3
71+
- name: Set up python
72+
uses: actions/setup-python@v4
73+
with:
74+
python-version: 3.9
75+
- name: Bootstrap poetry
76+
run: |
77+
curl -sSL https://install.python-poetry.org | python - -y --version 1.5.1
78+
- name: Install dependencies
79+
run: poetry install
80+
- name: Publish to pypi
81+
run: |
82+
poetry config repositories.remote https://upload.pypi.org/legacy/
83+
poetry --no-interaction -v publish --build --repository remote --username "$PYPI_USERNAME" --password "$PYPI_PASSWORD"
84+
env:
85+
PYPI_USERNAME: ${{ secrets.PYPI_USERNAME }}
86+
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "compass-sdk"
3-
version = "0.1.0"
3+
version = "1.0.0"
44
authors = []
55
description = "Compass SDK"
66

0 commit comments

Comments
 (0)