File tree Expand file tree Collapse file tree 1 file changed +26
-9
lines changed
Expand file tree Collapse file tree 1 file changed +26
-9
lines changed Original file line number Diff line number Diff line change 66# separate terms of service, privacy policy, and support
77# documentation.
88
9- name : Upload Python Package
9+ name : Publish Python 🐍 distributions 📦 to PyPI and TestPyPI
1010
11- on :
12- [push]
11+ on : push
1312
1413permissions :
1514 contents : read
1615
1716jobs :
1817 deploy :
19-
18+ name : Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI
2019 runs-on : ubuntu-latest
2120
2221 steps :
@@ -25,13 +24,31 @@ jobs:
2524 uses : actions/setup-python@v3
2625 with :
2726 python-version : ' 3.x'
28- - name : Install dependencies
27+ - name : Install pip
2928 run : |
3029 python -m pip install --upgrade pip
31- pip install build
32- - name : Build package
33- run : python -m build
34- - name : Publish package
30+ - name : Install pypa/build
31+ run : >-
32+ python -m
33+ pip install
34+ build
35+ --user
36+ - name : Build a binary wheel and a source tarball
37+ run : >-
38+ python -m
39+ build
40+ --sdist
41+ --wheel
42+ --outdir dist/
43+ .
44+ - name : Publish distribution 📦 to Test PyPI
45+ uses : pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
46+ with :
47+ user : __token__
48+ password : ${{ secrets.TEST_PYPI_API_TOKEN }}
49+ repository_url : https://test.pypi.org/legacy/
50+ - name : Publish distribution 📦 to PyPI
51+ if : startsWith(github.ref, 'refs/tags')
3552 uses : pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
3653 with :
3754 user : __token__
You can’t perform that action at this time.
0 commit comments