-
Notifications
You must be signed in to change notification settings - Fork 17
47 lines (42 loc) · 1.08 KB
/
python_publish.yaml
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
42
43
44
45
46
47
name: Upload Python Package
on:
push:
branches:
- issue-160
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python3 -m venv venv
. venv/bin/activate
pip install setuptools wheel twine
pip install -r requirements.txt
- name: run tests
env:
RETRY_ATTEMPTS: 1
with:
python-version: '3.10'
run: |
python -m pip install --upgrade pip
python3 -m venv venv
. venv/bin/activate
pip install -r requirements.txt
pip install nose2
nose2
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USER }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.p_y bdist_wheel --universal
twine upload dist/*