From e811cfdd607e4f7bc286d6f88b8f785bf7147064 Mon Sep 17 00:00:00 2001 From: "Wieland, Marc" Date: Fri, 14 Feb 2025 16:13:42 +0100 Subject: [PATCH] updated publisher again --- .github/workflows/python-publish.yml | 40 +++++++++++++++++++++++++--- 1 file changed, 36 insertions(+), 4 deletions(-) diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index 949c136..2a3983d 100755 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -4,15 +4,47 @@ on: release: types: [published] +permissions: + contents: read + jobs: + release-build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-python@v5 + with: + python-version: "3.x" + + - name: Build release distributions + run: | + python -m pip install build + python setup.py sdist bdist_wheel + + - name: Upload distributions + uses: actions/upload-artifact@v4 + with: + name: release-dists + path: dist/ + pypi-publish: - name: upload release to PyPI runs-on: ubuntu-latest - environment: pypi + needs: + - release-build permissions: id-token: write + environment: + name: pypi steps: - - name: Publish package distributions to PyPI + - name: Retrieve release distributions + uses: actions/download-artifact@v4 + with: + name: release-dists + path: dist/ + + - name: Publish release distributions to PyPI uses: pypa/gh-action-pypi-publish@release/v1 with: - python-version: '3.x' \ No newline at end of file + packages-dir: dist/ \ No newline at end of file