From e452f08530f24b16a74c4494fd5a8671428fe3e2 Mon Sep 17 00:00:00 2001 From: Sergii Mamedov Date: Thu, 8 Feb 2024 11:31:32 +0100 Subject: [PATCH] Update python-client action workflow (#1479) * Update python-client action workflow * Fix bugs * Bugfix * Bugfix * Bugfix * Bugfix * Remove username * Unable verbose * Turn off environment * Remove twine upload * Return back twine upload with login/password * Remove dead code --- .github/workflows/pythonpublish.yml | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/.github/workflows/pythonpublish.yml b/.github/workflows/pythonpublish.yml index b0b2bba16..dd952bb7d 100644 --- a/.github/workflows/pythonpublish.yml +++ b/.github/workflows/pythonpublish.yml @@ -1,26 +1,31 @@ name: Publish python-client -on: - workflow_dispatch: # Manual trigger +on: workflow_dispatch # Manual trigger jobs: - deploy: + build_and_deploy: + name: Create and publish package to PyPI runs-on: ubuntu-latest + steps: - - uses: actions/checkout@v3 + - name: Checkout repository + uses: actions/checkout@v4 + - name: Set up Python - uses: actions/setup-python@v3 + uses: actions/setup-python@v4 with: python-version: '3.8' + - name: Install dependencies run: | python -m pip install --upgrade pip pip install setuptools wheel twine + - name: Build and publish working-directory: ./metaspace/python-client env: - TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} - TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} + TWINE_USERNAME: __token__ + TWINE_PASSWORD: ${{ secrets.PYTHON_CLIENT_PYPI_API_TOKEN }} run: | python setup.py sdist bdist_wheel - twine upload dist/* + twine upload dist/* \ No newline at end of file