|
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 |
2 | 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 | 3 |
|
4 | | -name: Publish Python 🐍 distributions 📦 to PyPI and TestPyPI |
| 4 | +name: Publish Python 🐍 distributions 📦 to PyPI |
5 | 5 |
|
6 | 6 | on: |
7 | 7 | release: |
8 | 8 | types: [created] |
9 | 9 |
|
10 | 10 | 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 |
14 | 14 | 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 |
18 | 18 | with: |
19 | | - python-version: 3.x |
| 19 | + python-version: '3.x' |
20 | 20 | - name: Install dependencies |
21 | 21 | run: | |
22 | 22 | 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 }} |
25 | 28 | run: | |
26 | 29 | 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