Skip to content

Commit 27ae9a9

Browse files
authored
Update GitHub Actions for Python package publishing
1 parent a38a7d5 commit 27ae9a9

1 file changed

Lines changed: 10 additions & 12 deletions

File tree

.github/workflows/pythonpublish.yml

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,34 +5,32 @@ name: Upload Python Package
55

66
on:
77
release:
8-
types: [created]
8+
types: [published]
99

1010
jobs:
11-
deploy:
11+
pypi-publish:
12+
name: Upload release to PyPI
1213
runs-on: ubuntu-latest
1314
permissions:
1415
contents: read
15-
1616
steps:
17-
- uses: actions/checkout@v4
17+
- name: Checkout code
18+
uses: actions/checkout@v4
1819

1920
- name: Set up Python
2021
uses: actions/setup-python@v5
2122
with:
22-
python-version: '3.x'
23-
cache: 'pip'
23+
python-version: "3.x"
2424

25-
- name: Install dependencies
25+
- name: Install build dependencies
2626
run: |
2727
python -m pip install --upgrade pip
28-
pip install setuptools wheel twine
28+
pip install build
2929
3030
- name: Build package
31-
run: |
32-
python setup.py sdist bdist_wheel
31+
run: python -m build
3332

34-
- name: Publish a Python distribution to PyPI
33+
- name: Publish package distributions to PyPI
3534
uses: pypa/gh-action-pypi-publish@release/v1
3635
with:
37-
user: __token__
3836
password: ${{ secrets.PYPI_API_TOKEN }}

0 commit comments

Comments
 (0)