File tree Expand file tree Collapse file tree 2 files changed +81
-1
lines changed Expand file tree Collapse file tree 2 files changed +81
-1
lines changed Original file line number Diff line number Diff line change 1+ # This workflow publishes package to pypi via poetry
2+
3+ name : Publish package
4+
5+ on :
6+ push :
7+ tags :
8+ - ' *'
9+
10+ jobs :
11+ build :
12+ strategy :
13+ matrix :
14+ os : [ubuntu-latest, windows-latest, macos-latest]
15+ python-version : [3.6, 3.7, 3.8]
16+
17+ runs-on : ${{ matrix.os }}
18+
19+ steps :
20+ - uses : actions/checkout@v2
21+ with :
22+ submodules : true
23+ - name : Set up Python ${{ matrix.python-version }}
24+ uses : actions/setup-python@v1
25+ with :
26+ python-version : ${{ matrix.python-version }}
27+ - name : Install poetry
28+ run : |
29+ pip install poetry
30+ shell : bash
31+ - name : Set poetry env
32+ run : |
33+ poetry config virtualenvs.create false
34+ poetry install --no-root
35+ shell : bash
36+ - name : Create tarball
37+ if : matrix.os == 'ubuntu-latest' && matrix.python-version == 3.7
38+ run : |
39+ task build -f sdist
40+ shell : bash
41+ - name : Create wheel
42+ if : matrix.os == 'windows-latest' || matrix.os == 'macos-latest'
43+ run : |
44+ task build -f wheel
45+ shell : bash
46+ - name : Upload artifacts
47+ if : success()
48+ uses : actions/upload-artifact@v2
49+ with :
50+ name : artifacts
51+ path : dist/
52+
53+
54+ publish :
55+ runs-on : ubuntu-latest
56+ needs : build
57+ steps :
58+ - uses : actions/checkout@v2
59+ - name : Set up Python 3.7
60+ uses : actions/setup-python@v1
61+ with :
62+ python-version : 3.7
63+ - name : Install poetry
64+ run : |
65+ pip install poetry
66+ shell : bash
67+ - name : Clear dist folder
68+ run : |
69+ rm -rf dist/
70+ - name : Download
71+ uses : actions/download-artifact@v2
72+ with :
73+ name : artifacts
74+ path : dist/
75+ - name : Publish to PyPI
76+ if : success()
77+ run : |
78+ poetry config repositories.testpypi https://test.pypi.org/legacy/
79+ poetry publish -r testpypi -u ${{ secrets.PYPI_USERNAME }} -p ${{ secrets.PYPI_PASSWORD }}
80+ shell : bash
Original file line number Diff line number Diff line change 4343 pip install dist/dxfeed*
4444 pip uninstall --yes dxfeed
4545 shell : bash
46- build :
46+ tests :
4747 needs : installation
4848 strategy :
4949 matrix :
You can’t perform that action at this time.
0 commit comments