Skip to content

Commit d9fd68a

Browse files
committed
ci: update pypi workflow for pyproject
1 parent 3d6bbeb commit d9fd68a

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

.github/workflows/pythonpublish.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,16 @@ jobs:
1515
python-version: '3.x'
1616
- name: Install dependencies
1717
run: |
18-
python -m pip install --upgrade pip
19-
pip install setuptools wheel twine==5.0.0
18+
python -m pip install --upgrade pip build twine
2019
21-
- name: Build and publish
20+
- name: Build distribution artifacts
21+
run: |
22+
# this will read pyproject.toml and produce both sdist and wheel in dist/
23+
python -m build --sdist --wheel
24+
25+
- name: Publish to PyPI
2226
env:
2327
TWINE_USERNAME: __token__
2428
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
2529
run: |
26-
python setup.py sdist bdist_wheel
2730
twine upload dist/*

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,3 +68,4 @@ exclude = ["docs", "tests", "examples"]
6868

6969
[tool.setuptools_scm]
7070
version_file = "devito/_version.py"
71+
fallback_version = "0+untagged"

0 commit comments

Comments
 (0)