-
Notifications
You must be signed in to change notification settings - Fork 5
52 lines (44 loc) · 1.17 KB
/
AutoPushToPypi.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
42
43
44
45
46
47
48
49
50
51
52
name: Push easyclimate to pypi
on:
push:
branches: [ main ]
tags:
- v*
# - TEST*
# paths:
# - 'rapid_videocr/**'
# - 'docs/doc_whl.md'
# - 'setup.py'
# - '.github/workflows/AutoPushToPypi.yml'
jobs:
UnitTesting:
runs-on: ubuntu-latest
steps:
- name: Pull latest code
uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: '3.10'
architecture: 'x64'
- name: Unit testings
run: |
pip install -r test_requirements.txt
pytest --cov src
GenerateWHL_PushPyPi:
needs: UnitTesting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Run setup.py
run: |
pip install --upgrade build
python -m pip install --upgrade pip
python -m build
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
# For real release
password: ${{ secrets.PYPI_API_TOKEN }}
repository-url: https://pypi.org/legacy/
packages-dir: dist/