File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ name : Publish Python distribution package to PyPI and TestPyPI
3
+ on : push
4
+ jobs :
5
+ build-n-publish :
6
+ name : Build and publish Python distributions to PyPI and TestPyPI
7
+ runs-on : ubuntu-latest
8
+ steps :
9
+ - uses : actions/checkout@master
10
+ - name : Set up Python 3.9
11
+ uses : actions/setup-python@v1
12
+ with :
13
+ python-version : 3.9
14
+ - name : Build a binary wheel and a source tarball
15
+ run : python setup.py sdist
16
+ - name : Publish distribution package to Test PyPI
17
+ uses : pypa/gh-action-pypi-publish@master
18
+ with :
19
+ password : ${{ secrets.TEST_PYPI_API_TOKEN }}
20
+ repository_url : https://test.pypi.org/legacy/
21
+ skip_existing : true
22
+ - name : Publish distribution package to PyPI
23
+ if : startsWith(github.ref, 'refs/tags')
24
+ uses : pypa/gh-action-pypi-publish@master
25
+ with :
26
+ password : ${{ secrets.PYPI_API_TOKEN }}
27
+ skip_existing : true
You can’t perform that action at this time.
0 commit comments