Skip to content

Commit 52390cf

Browse files
committed
Update workflow: test on Python 3.10 & 3.12, use trusted publishing
1 parent c4198cc commit 52390cf

1 file changed

Lines changed: 5 additions & 9 deletions

File tree

.github/workflows/test-and-publish.yml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
strategy:
1313
matrix:
1414
os: [ubuntu-latest, macos-latest]
15-
python-version: ['3.10', '3.11', '3.12', '3.13']
15+
python-version: ['3.10', '3.12'] # Test minimum (3.10) and stable (3.12) versions
1616

1717
steps:
1818
- name: Checkout code
@@ -48,6 +48,8 @@ jobs:
4848
name: Publish to PyPI
4949
needs: test
5050
runs-on: ubuntu-latest
51+
permissions:
52+
id-token: write # Required for trusted publishing
5153

5254
steps:
5355
- name: Checkout code
@@ -61,16 +63,10 @@ jobs:
6163
- name: Install build dependencies
6264
run: |
6365
python -m pip install --upgrade pip
64-
pip install build twine
66+
pip install build
6567
6668
- name: Build package
6769
run: python -m build
6870

69-
- name: Check distribution
70-
run: twine check dist/*
71-
7271
- name: Publish to PyPI
73-
env:
74-
TWINE_USERNAME: __token__
75-
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
76-
run: twine upload dist/*
72+
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)