From 287a06900b3fe4e261fc8eaa7e0a00ee62f895f0 Mon Sep 17 00:00:00 2001 From: Tom Schoonjans Date: Tue, 30 Jul 2024 20:35:14 +0100 Subject: [PATCH] Fixup publish-to-pypi job --- .github/workflows/build-publish-pypi.yml | 53 ++++++++++++------------ 1 file changed, 27 insertions(+), 26 deletions(-) diff --git a/.github/workflows/build-publish-pypi.yml b/.github/workflows/build-publish-pypi.yml index 8359da62..0c3472fe 100644 --- a/.github/workflows/build-publish-pypi.yml +++ b/.github/workflows/build-publish-pypi.yml @@ -50,35 +50,37 @@ jobs: path: dist/*.tar.gz retention-days: 1 - publish-to-testpypi: - name: Upload to TestPyPI - needs: [build_wheels, build_sdist] - runs-on: ubuntu-latest + # publish-to-testpypi: + # name: Upload to TestPyPI + # needs: [build_wheels, build_sdist] + # runs-on: ubuntu-latest - environment: - name: testpypi - url: https://test.pypi.org/p/xraylib + # environment: + # name: testpypi + # url: https://test.pypi.org/p/xraylib - permissions: - id-token: write # IMPORTANT: mandatory for trusted publishing + # permissions: + # id-token: write # IMPORTANT: mandatory for trusted publishing - steps: - - uses: actions/download-artifact@v4 - with: - # unpacks all CIBW artifacts into dist/ - pattern: cibw-* - path: dist - merge-multiple: true - - name: Publish distribution 📦 to TestPyPI - uses: pypa/gh-action-pypi-publish@release/v1 - with: - repository-url: https://test.pypi.org/legacy/ + # steps: + # - uses: actions/download-artifact@v4 + # with: + # # unpacks all CIBW artifacts into dist/ + # pattern: cibw-* + # path: dist + # merge-multiple: true + # - name: Publish distribution 📦 to TestPyPI + # uses: pypa/gh-action-pypi-publish@release/v1 + # with: + # repository-url: https://test.pypi.org/legacy/ - upload_pypi: + publish-to-pypi: name: Upload to PyPI needs: [build_wheels, build_sdist] runs-on: ubuntu-latest - environment: pypi + environment: + name: pypi + url: https://pypi.org/p/xraylib permissions: id-token: write if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') @@ -89,7 +91,6 @@ jobs: pattern: cibw-* path: dist merge-multiple: true - - - uses: pypa/gh-action-pypi-publish@release/v1 - # with: - # To test: repository-url: https://test.pypi.org/legacy/ \ No newline at end of file + - name: Publish distribution 📦 to TestPyPI + uses: pypa/gh-action-pypi-publish@release/v1 + \ No newline at end of file