From d7bea3fa65c8a7373188983cf6767854be42c798 Mon Sep 17 00:00:00 2001 From: Tommy <10076072+tommyod@users.noreply.github.com> Date: Thu, 29 Feb 2024 17:40:32 +0100 Subject: [PATCH] Update build.yml with pypi API token (#165) * Update build.yml with pypi API token * Remove push condition --- .github/workflows/build.yml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 25f48a6..ee7d4de 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -79,10 +79,11 @@ jobs: with: name: python-package-distributions path: dist/ - - - name: Upload to PyPI - env: - PYPI_PASSWORD: ${{ secrets.pypi_password }} - run: | - pip install twine; - python -m twine upload dist/* -u tommyod -p "$PYPI_PASSWORD" --skip-existing; + + # https://github.com/pypa/gh-action-pypi-publish + - name: Publish Python distribution to PyPI + uses: pypa/gh-action-pypi-publish@e53eb8b103ffcb59469888563dc324e3c8ba6f06 + with: + skip-existing: true + user: __token__ + password: ${{ secrets.PYPI_API_TOKEN }}