File tree Expand file tree Collapse file tree 1 file changed +39
-0
lines changed
Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Publish Python Distributions to PyPi and TestPyPi
2+
3+ on : push
4+
5+ jobs :
6+ build-n-publish :
7+ name : Publish Python Distributions to PyPi and TestPyPi
8+ runs-on : ubuntu-latest
9+
10+ steps :
11+ - uses : actions/checkout@master
12+ - name : Set up Python 3.10
13+ uses : actions/setup-python@v3
14+ with :
15+ python-version : " 3.10"
16+ - name : Install pypa/build
17+ run : >-
18+ python -m
19+ pip install
20+ build
21+ --user
22+ - name : Build a binary wheel and a source tarball
23+ run : >-
24+ python -m
25+ build
26+ --sdist
27+ --wheel
28+ --outdir dist/
29+ .
30+ - name : Publish distribution to Test PyPI
31+ uses : pypa/gh-action-pypi-publish@release/v1
32+ with :
33+ password : ${{ secrets.TEST_PYPI_API_TOKEN }}
34+ repository_url : https://test.pypi.org/legacy/
35+ - name : Publish distribution to PyPI
36+ if : startsWith(github.ref, 'refs/tags')
37+ uses : pypa/gh-action-pypi-publish@release/v1
38+ with :
39+ password : ${{ secrets.PYPI_API_TOKEN }}
You can’t perform that action at this time.
0 commit comments