File tree Expand file tree Collapse file tree 2 files changed +31
-1
lines changed Expand file tree Collapse file tree 2 files changed +31
-1
lines changed Original file line number Diff line number Diff line change 1+ name : Publish Python distribution to PyPI and TestPyPI
2+
3+ on : push
4+
5+ jobs :
6+ build-n-publish :
7+ name : Build and public Python distribution to PyPI and TestPyPI
8+ runs-on : ubuntu-latest
9+ steps :
10+ - uses : actions/checkout@master
11+ - name : Set up Python 3.10
12+ uses : actions/setup-python@v3
13+ with :
14+ python-version : " 3.10"
15+ - name : Install pypa/build
16+ run : >-
17+ python -m pip install --user ".[build]"
18+ - name : Build a binary wheel and a source tarball
19+ run : >-
20+ python -m build --sdist --wheel --outdir dist/
21+ - name : Publish Distribution to Test PyPI
22+ uses : pypa/gh-action-pypi-publish@release/v1
23+ with :
24+ password : ${{ secrets.TESTPYPI_API_TOKEN }}
25+ repository_url : https://test.pypi.org/legacy/
26+ - name : Publish Distribution to PyPI
27+ if : startsWith(github.ref, 'refs/tags')
28+ uses : pypa/gh-action-pypi-public@release/v1
29+ with :
30+ password : ${{ secrets.PYPI_API_TOKEN }}
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ tests =
5050 isort<5,>=4.2.5
5151
5252build =
53- pep517
53+ build
5454
5555docs =
5656 sphinx
You can’t perform that action at this time.
0 commit comments