File tree Expand file tree Collapse file tree 2 files changed +41
-1
lines changed Expand file tree Collapse file tree 2 files changed +41
-1
lines changed Original file line number Diff line number Diff line change 1+ name : Publish Python 🐍 distributions 📦 to PyPI and TestPyPI
2+ on :
3+ push :
4+ tags :
5+ - ' [0-9]+.[0-9]+.[0-9]+'
6+ release :
7+ types :
8+ - published
9+ jobs :
10+ build-n-publish :
11+ name : Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI
12+ runs-on : ubuntu-latest
13+ steps :
14+ - uses : actions/checkout@master
15+
16+ - name : Set up Python 3.10
17+ uses : actions/setup-python@v1
18+ with :
19+ python-version : 3.10
20+
21+ - name : Update version
22+ run : sed -i "s/version = .*/version = '${{github.ref_name}}'/" pyproject.toml
23+
24+ - name : Build a binary wheel and a source tarball
25+ run : poetry build
26+
27+ - name : Publish distribution 📦 to Test PyPI
28+ if : github.event_name == 'push'
29+ uses : pypa/gh-action-pypi-publish@v1.5.0
30+ with :
31+ user : __token__
32+ password : ${{ secrets.TEST_PYPI_API_TOKEN }}
33+ repository_url : https://test.pypi.org/legacy/
34+
35+ - name : Publish distribution 📦 to PyPI if triggered by release
36+ if : github.event_name == 'release'
37+ uses : pypa/gh-action-pypi-publish@v1.5.0
38+ with :
39+ user : __token__
40+ password : ${{ secrets.PYPI_API_TOKEN }}
Original file line number Diff line number Diff line change 11[tool .poetry ]
22name = " py_swagger_ui"
3- version = " 1.0.0 "
3+ version = ' test '
44description = " Swagger UI bundled for usage with Python"
55readme = " README.rst"
66keywords = [" swagger-ui" ]
You can’t perform that action at this time.
0 commit comments