File tree Expand file tree Collapse file tree 1 file changed +54
-0
lines changed
Expand file tree Collapse file tree 1 file changed +54
-0
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+ publishing :
12+ strategy :
13+ matrix :
14+ os : [ubuntu-latest, windows-latest, macos-latest]
15+ python-version : [3.7]
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 package artifacts
37+ run : |
38+ task build
39+ shell : bash
40+ - name : Remove redundant files
41+ if : success()
42+ run : |
43+ if [ "$RUNNER_OS" == "Linux" ]; then
44+ find dist/ -type f -iname *.whl -delete
45+ else
46+ find dist/ -type f -iname *.tar.gz -delete
47+ fi
48+ shell : bash
49+ - name : Publish to PyPI
50+ if : success()
51+ run : |
52+ poetry config repositories.testpypi https://test.pypi.org/legacy/
53+ poetry publish -r testpypi -u ${{ secrets.PYPI_USERNAME }} -p ${{ secrets.PYPI_PASSWORD }}
54+ shell : bash
You can’t perform that action at this time.
0 commit comments