-
Notifications
You must be signed in to change notification settings - Fork 4
41 lines (39 loc) · 1.18 KB
/
pypi.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
---
name: Upload to PyPI
on:
push:
tags:
- v*
jobs:
tox:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
make_target: [test, tox_docs]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.8
# GHA won't setup tox for us and we use tox-pip-extensions for venv-update
- run: pip install tox==3.2 tox-pip-extensions==1.3.0
- run: make ${{ matrix.make_target }}
pypi:
# lets run tests before we push anything to pypi, much like we do internally
needs: tox
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.8
# GHA won't setup tox for us and we use tox-pip-extensions for venv-update
# and we need wheel for actually building wheels :p
- run: pip install tox==3.2 tox-pip-extensions==1.3.0 wheel
# this will create an sdist and wheel under dist/
- run: make pypi
# and then this uploads those artifacts to pypi
- uses: pypa/gh-action-pypi-publish@v1.2.2
with:
password: ${{ secrets.pypi_password }}