From d856175a9dc494a368136791120310c17ffbe85e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Bukowski?= Date: Mon, 23 Dec 2024 23:06:44 +0100 Subject: [PATCH] Change pythonpublish.yml to trusted publisher scheme --- .github/workflows/pythonpublish.yml | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/.github/workflows/pythonpublish.yml b/.github/workflows/pythonpublish.yml index ba717eb..3551a50 100644 --- a/.github/workflows/pythonpublish.yml +++ b/.github/workflows/pythonpublish.yml @@ -7,6 +7,9 @@ on: jobs: deploy: runs-on: ubuntu-latest + environment: release + permissions: + id-token: write steps: - uses: actions/checkout@v4 - name: Set up Python @@ -16,11 +19,6 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install setuptools wheel twine - - name: Build and publish - env: - TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} - TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} - run: | - python setup.py sdist bdist_wheel - twine upload dist/* + pip install setuptools wheel + - name: Publish package distributions to PyPI + uses: pypa/gh-action-pypi-publish@release/v1