-
Notifications
You must be signed in to change notification settings - Fork 17
34 lines (32 loc) · 889 Bytes
/
publish.yml
File metadata and controls
34 lines (32 loc) · 889 Bytes
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
name: Upload Python Package
on:
release:
types: [published]
jobs:
deploy:
runs-on: ubuntu-20.04
strategy:
matrix:
python: [3.7, 3.8, 3.9, '3.10']
steps:
- uses: actions/checkout@v1
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python }}
- name: Install Tox and any other packages
run: |
python -m pip install --upgrade pip
pip install -r requirements/test.txt
- name: Run Tox
run: tox -e py
- name: Install build dependencies
run: |
pip install setuptools wheel twine
- name: Build and publish
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*