From e02257af21308fb4f47ef647c01ec31598a53033 Mon Sep 17 00:00:00 2001 From: Tom Schoonjans Date: Tue, 30 Jul 2024 19:16:00 +0100 Subject: [PATCH 1/3] Deploy to TestPyPI --- .github/workflows/build-publish-pypi.yml | 26 +++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-publish-pypi.yml b/.github/workflows/build-publish-pypi.yml index 57303ee0..8359da62 100644 --- a/.github/workflows/build-publish-pypi.yml +++ b/.github/workflows/build-publish-pypi.yml @@ -50,8 +50,32 @@ jobs: path: dist/*.tar.gz retention-days: 1 + 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 + + 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/ + upload_pypi: - name: Upload to pypi + name: Upload to PyPI needs: [build_wheels, build_sdist] runs-on: ubuntu-latest environment: pypi From 104a5de0d85bd2dcb1c0bf5059d631a1b126e1df Mon Sep 17 00:00:00 2001 From: Tom Schoonjans Date: Tue, 30 Jul 2024 19:50:57 +0100 Subject: [PATCH 2/3] Fix classifiers --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index ca059236..fb594a44 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,7 +8,7 @@ requires-python = "~=3.8" readme = "README.md" classifiers = [ "Intended Audience :: Developers", - "License :: OSI Approved :: BSD", + "License :: OSI Approved :: BSD License", "Programming Language :: Python :: 3", "Topic :: Software Development :: Libraries :: Python Modules", ] From 287a06900b3fe4e261fc8eaa7e0a00ee62f895f0 Mon Sep 17 00:00:00 2001 From: Tom Schoonjans Date: Tue, 30 Jul 2024 20:35:14 +0100 Subject: [PATCH 3/3] 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