Skip to content

Commit ba4ed4d

Browse files
authored
Fix wrong publish version used in pypi
Using twine and github actions instead of pypa
1 parent f39fc9b commit ba4ed4d

File tree

1 file changed

+15
-22
lines changed

1 file changed

+15
-22
lines changed
Lines changed: 15 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,30 @@
1-
# This workflows will upload a Python Package using pypa/gh-action-pypi-publish@master 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-
name: Publish Python 🐍 distributions 📦 to PyPI and TestPyPI
4+
name: Publish Python 🐍 distributions 📦 to PyPI
55

66
on:
77
release:
88
types: [created]
99

1010
jobs:
11-
build-n-publish:
12-
name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI
13-
runs-on: ubuntu-18.04
11+
deploy:
12+
13+
runs-on: ubuntu-latest
1414
steps:
15-
- uses: actions/checkout@master
16-
- name: Set up Python 3.x
17-
uses: actions/setup-python@v1
15+
- uses: actions/checkout@v2
16+
- name: Set up Python
17+
uses: actions/setup-python@v2
1818
with:
19-
python-version: 3.x
19+
python-version: '3.x'
2020
- name: Install dependencies
2121
run: |
2222
python -m pip install --upgrade pip
23-
pip install setuptools wheel
24-
- name: Build a binary wheel and a source tarball
23+
pip install setuptools wheel twine
24+
- name: Build and publish
25+
env:
26+
TWINE_USERNAME: __token__
27+
TWINE_PASSWORD: ${{ secrets.pypi_password }}
2528
run: |
2629
python setup.py sdist bdist_wheel
27-
- name: Publish distribution 📦 to Test PyPI
28-
uses: pypa/gh-action-pypi-publish@master
29-
with:
30-
user: __token__
31-
password: ${{ secrets.test_pypi_password }}
32-
repository_url: https://test.pypi.org/legacy/
33-
- name: Publish distribution 📦 to PyPI
34-
uses: pypa/gh-action-pypi-publish@master
35-
with:
36-
user: __token__
37-
password: ${{ secrets.pypi_password }}
30+
twine upload dist/*

0 commit comments

Comments
 (0)