Skip to content

Commit b99d499

Browse files
authored
Update python-publish.yml
1 parent 5e310dd commit b99d499

File tree

1 file changed

+9
-19
lines changed

1 file changed

+9
-19
lines changed

Diff for: .github/workflows/python-publish.yml

+9-19
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,12 @@
1-
# This workflow 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-
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-
91
name: Upload Python Package
102

113
on:
124
release:
135
types: [published]
146

157
jobs:
16-
deploy:
17-
8+
release-pypi:
189
runs-on: ubuntu-latest
19-
2010
steps:
2111
- uses: actions/checkout@v2
2212
- name: Set up Python
@@ -26,11 +16,11 @@ jobs:
2616
- name: Install dependencies
2717
run: |
2818
python -m pip install --upgrade pip
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 }}
19+
pip install setuptools wheel twine
20+
- name: Build and publish
21+
env:
22+
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}
23+
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
24+
run: |
25+
python setup.py sdist bdist_wheel
26+
twine upload dist/*

0 commit comments

Comments
 (0)