Skip to content

Commit e8b4e21

Browse files
Update pythonpublish.yml (#691)
1 parent 4e187c2 commit e8b4e21

1 file changed

Lines changed: 14 additions & 23 deletions

File tree

Lines changed: 14 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,23 @@
1-
# This workflows will upload a Python Package using Twine when a release is created
2-
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
3-
41
name: Upload Python Package
52

63
on:
74
release:
85
types: [created]
9-
workflow_dispatch:
106

117
jobs:
12-
deploy:
13-
8+
publish:
149
runs-on: ubuntu-latest
15-
1610
steps:
17-
- uses: actions/checkout@v4
18-
- name: Set up Python
19-
uses: actions/setup-python@v5
20-
with:
21-
python-version: '3.x'
22-
- name: Install dependencies
23-
run: |
24-
python -m pip install --upgrade pip
25-
pip install setuptools wheel twine
26-
- name: Build and publish
27-
env:
28-
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
29-
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
30-
run: |
31-
python setup.py sdist bdist_wheel
32-
twine upload dist/*
11+
- uses: actions/checkout@v4
12+
- uses: actions/setup-python@v5
13+
with:
14+
python-version: '3.x'
15+
- run: |
16+
python -m pip install --upgrade pip
17+
pip install build
18+
python -m build
19+
- name: Publish to PyPI
20+
uses: pypa/gh-action-pypi-publish@release/v1
21+
with:
22+
user: __token__
23+
password: ${{ secrets.PYPI_API_TOKEN }}

0 commit comments

Comments
 (0)