Skip to content

Commit 5e51842

Browse files
committed
fix pypi
1 parent facb08a commit 5e51842

File tree

1 file changed

+15
-10
lines changed

1 file changed

+15
-10
lines changed
Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
1-
# This workflows will upload a Python Package using Twine when a release is created
1+
# This workflow will upload a Python Package using Twine when a release is created
22
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
33

4+
# This workflow uses actions that are not certified by GitHub.
5+
# They are provided by a third-party and are governed by
6+
# separate terms of service, privacy policy, and support
7+
# documentation.
8+
49
name: Upload Python Package
510

611
on:
712
release:
8-
types: [created]
13+
types: [published]
914

1015
jobs:
1116
deploy:
@@ -21,11 +26,11 @@ jobs:
2126
- name: Install dependencies
2227
run: |
2328
python -m pip install --upgrade pip
24-
pip install setuptools wheel twine
25-
- name: Build and publish
26-
env:
27-
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
28-
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
29-
run: |
30-
python setup.py sdist bdist_wheel
31-
twine upload dist/*
29+
pip install build
30+
- name: Build package
31+
run: python -m build
32+
- name: Publish package
33+
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
34+
with:
35+
user: __token__
36+
password: ${{ secrets.PYPI_API_TOKEN }}

0 commit comments

Comments
 (0)