Skip to content

Commit

Permalink
Updating publish step. Setting version to release.narwhal
Browse files Browse the repository at this point in the history
  • Loading branch information
ankush-cohere committed Oct 10, 2024
1 parent 5dc1b56 commit 541610e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 22 deletions.
35 changes: 14 additions & 21 deletions .github/workflows/test_publish.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "Test"
name: "Test and Publish"

on:
push:
Expand Down Expand Up @@ -61,26 +61,19 @@ jobs:
run: |
echo $COHERE_API_KEY
pytest -sv tests/test_compass_client.py
publish:
needs: [test_client]
pypi-publish:
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
needs:
- test_client
permissions:
id-token: write

steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Set up python
uses: actions/setup-python@v4
- name: Retrieve release distributions
uses: actions/download-artifact@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 }}
name: release-dists
path: dist/
- name: Publish release distributions to PyPI
uses: pypa/gh-action-pypi-publish@3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f
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 = "1.0.0"
version = "release.narwhal"
authors = []
description = "Compass SDK"

Expand Down

0 comments on commit 541610e

Please sign in to comment.