Skip to content

Commit 425f19e

Browse files
committed
Latest workflows
1 parent ce8e360 commit 425f19e

File tree

2 files changed

+26
-10
lines changed

2 files changed

+26
-10
lines changed

.github/workflows/publish.yml

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
runs-on: ubuntu-latest
1313
strategy:
1414
matrix:
15-
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
15+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
1616
steps:
1717
- uses: actions/checkout@v4
1818
- name: Set up Python ${{ matrix.python-version }}
@@ -26,19 +26,16 @@ jobs:
2626
pip install '.[test]'
2727
- name: Run tests
2828
run: |
29-
pytest
30-
deploy:
29+
python -m pytest
30+
build:
3131
runs-on: ubuntu-latest
3232
needs: [test]
33-
environment: release
34-
permissions:
35-
id-token: write
3633
steps:
3734
- uses: actions/checkout@v4
3835
- name: Set up Python
3936
uses: actions/setup-python@v5
4037
with:
41-
python-version: "3.12"
38+
python-version: "3.13"
4239
cache: pip
4340
cache-dependency-path: pyproject.toml
4441
- name: Install dependencies
@@ -47,6 +44,25 @@ jobs:
4744
- name: Build
4845
run: |
4946
python -m build
50-
- name: Publish
47+
- name: Store the distribution packages
48+
uses: actions/upload-artifact@v4
49+
with:
50+
name: python-packages
51+
path: dist/
52+
publish:
53+
name: Publish to PyPI
54+
runs-on: ubuntu-latest
55+
if: startsWith(github.ref, 'refs/tags/')
56+
needs: [build]
57+
environment: release
58+
permissions:
59+
id-token: write
60+
steps:
61+
- name: Download distribution packages
62+
uses: actions/download-artifact@v4
63+
with:
64+
name: python-packages
65+
path: dist/
66+
- name: Publish to PyPI
5167
uses: pypa/gh-action-pypi-publish@release/v1
5268

.github/workflows/test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
runs-on: ubuntu-latest
1111
strategy:
1212
matrix:
13-
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
13+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
1414
steps:
1515
- uses: actions/checkout@v4
1616
- name: Set up Python ${{ matrix.python-version }}
@@ -24,4 +24,4 @@ jobs:
2424
pip install '.[test]'
2525
- name: Run tests
2626
run: |
27-
[ -d tests ] && pytest || echo "Tests directory not found"
27+
[ -d tests ] && python -m pytest || echo "Tests directory not found"

0 commit comments

Comments
 (0)