Skip to content

Commit

Permalink
Merge pull request #242 from tschoonj/deploy-to-test-pypi
Browse files Browse the repository at this point in the history
Deploy to TestPyPI
  • Loading branch information
tschoonj authored Aug 7, 2024
2 parents a45524a + 287a069 commit 99536a3
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 8 deletions.
39 changes: 32 additions & 7 deletions .github/workflows/build-publish-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,37 @@ jobs:
path: dist/*.tar.gz
retention-days: 1

upload_pypi:
name: Upload to pypi
# 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/

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')
Expand All @@ -65,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/
- name: Publish distribution 📦 to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
]
Expand Down

0 comments on commit 99536a3

Please sign in to comment.