File tree Expand file tree Collapse file tree 1 file changed +13
-5
lines changed
Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Original file line number Diff line number Diff line change 11name : Publish Python 🐍 distributions 📦 to PyPI and TestPyPI
22
3- on : push
3+ # publish wheels and source to test.pypi.org on releases/* branch
4+ # publish wheels and source to pypi.org when pushing v* tag on master or releasees/* branch
5+
6+ on :
7+ push :
8+ branches :
9+ - master
10+ - releases/*
11+ tags :
12+ - v*
413
514jobs :
615 build-n-publish :
@@ -18,15 +27,14 @@ jobs:
1827 with :
1928 python-version : 3.9
2029 - name : Install dependency
21- run : python -m pip install -U pip wheel setuptools setuptools_scm[toml] twine
30+ run : python -m pip install -U pip wheel setuptools setuptools_scm[toml] twine build
2231 - name : Build release assets
2332 run : |
24- python setup.py sdist
25- python -m pip wheel .
33+ python -m build --sdist --wheel
2634 - name : twine check
2735 run : python -m twine check dist/*
2836 - name : Publish distribution 📦 to Test PyPI
29- if : startsWith(github.event.ref, 'refs/heads/master ')
37+ if : startsWith(github.event.ref, 'refs/heads/releases/ ')
3038 uses : pypa/gh-action-pypi-publish@master
3139 with :
3240 password : ${{ secrets.testpypi_password }}
You can’t perform that action at this time.
0 commit comments