diff --git a/.github/workflows/test_publish.yml b/.github/workflows/test_publish.yml index 903a1b2..f4857dc 100644 --- a/.github/workflows/test_publish.yml +++ b/.github/workflows/test_publish.yml @@ -1,4 +1,4 @@ -name: "Test" +name: "Test and Publish" on: push: @@ -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 \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 2479fd2..5c4a4a6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "compass-sdk" -version = "1.0.0" +version = "release.narwhal" authors = [] description = "Compass SDK"