From a4237f1cc48c992b87a5a31cc10930fc7d6b650a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Ricks?= Date: Thu, 20 Apr 2023 09:38:18 +0200 Subject: [PATCH] Change: Use new pypi-upload action for releasing the Python package Avoid code duplication by using the new pypi-upload action for building and releasing the Python package. --- .github/workflows/deploy-pypi.yml | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/.github/workflows/deploy-pypi.yml b/.github/workflows/deploy-pypi.yml index 8a31d638..628eacc3 100644 --- a/.github/workflows/deploy-pypi.yml +++ b/.github/workflows/deploy-pypi.yml @@ -8,20 +8,7 @@ jobs: deploy: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - name: Set up Python - uses: actions/setup-python@v4 + - name: Build and publish to PyPI + uses: greenbone/actions/pypi-upload@v2 with: - python-version: "3.10" - - name: Install dependencies - run: | - python -m pip install --upgrade pip - python -m pip install --upgrade poetry - python -m pip install --upgrade twine - - name: Build and publish - env: - TWINE_USERNAME: __token__ - TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} - run: | - poetry build - twine upload dist/* + pypi-token: ${{ secrets.PYPI_TOKEN }}