|
10 | 10 | - uses: actions/checkout@v2
|
11 | 11 |
|
12 | 12 | - name: Set up Python version
|
13 |
| - uses: actions/setup-python@v1 |
| 13 | + uses: actions/setup-python@v2 |
14 | 14 | with:
|
15 | 15 | python-version: 3.8
|
16 | 16 |
|
|
27 | 27 | - uses: actions/checkout@v2
|
28 | 28 |
|
29 | 29 | - name: Set up Python version
|
30 |
| - uses: actions/setup-python@v1 |
| 30 | + uses: actions/setup-python@v2 |
31 | 31 | with:
|
32 | 32 | python-version: 3.8
|
33 | 33 |
|
|
44 | 44 | - uses: actions/checkout@v2
|
45 | 45 |
|
46 | 46 | - name: Set up Python version
|
47 |
| - uses: actions/setup-python@v1 |
| 47 | + uses: actions/setup-python@v2 |
48 | 48 | with:
|
49 | 49 | python-version: 3.8
|
50 | 50 |
|
|
65 | 65 | - uses: actions/checkout@v2
|
66 | 66 |
|
67 | 67 | - name: Set up Python ${{ matrix.python-version }}
|
68 |
| - uses: actions/setup-python@v1 |
| 68 | + uses: actions/setup-python@v2 |
69 | 69 | with:
|
70 | 70 | python-version: ${{ matrix.python-version }}
|
71 | 71 |
|
|
82 | 82 |
|
83 | 83 | - name: Upload coverage report
|
84 | 84 | run: bash <(curl -s https://codecov.io/bash)
|
| 85 | + |
| 86 | + publish: |
| 87 | + runs-on: ubuntu-18.04 |
| 88 | + |
| 89 | + steps: |
| 90 | + - uses: actions/checkout@v2 |
| 91 | + |
| 92 | + - name: Set up Python version |
| 93 | + uses: actions/setup-python@v2 |
| 94 | + with: |
| 95 | + python-version: 3.8 |
| 96 | + |
| 97 | + - name: Publish to PyPI |
| 98 | + if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v') |
| 99 | + run: | |
| 100 | + pip install --upgrade setuptools wheel twine |
| 101 | + python setup.py sdist bdist_wheel |
| 102 | + export TWINE_USERNAME=__token__ |
| 103 | + export TWINE_PASSWORD=${{ secrets.PYPI_TOKEN }} |
| 104 | + twine upload dist/* |
0 commit comments