Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 11 additions & 10 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,16 @@ on:
release:
types: [created]

permissions:
id-token: write # Required for trusted publishing to PyPI
contents: read

jobs:
publish:
runs-on: ubuntu-latest
permissions:
id-token: write # Required for trusted publishing to PyPI
contents: read

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -57,11 +64,9 @@ jobs:
python -m twine check dist/*

- name: Publish to TestPyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_API_TOKEN }}
run: |
python -m twine upload --repository testpypi dist/*
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/

- name: Verify TestPyPI installation
run: |
Expand All @@ -78,8 +83,4 @@ jobs:
echo "✓ TestPyPI package verified successfully!"

- name: Publish to PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: |
python -m twine upload dist/*
uses: pypa/gh-action-pypi-publish@release/v1
Loading