File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Publish to PyPI
2+
3+ on :
4+ push :
5+ tags :
6+ - ' v*.*.*' # Workflow start when you push tag in folovings format: v1.0.0
7+
8+ jobs :
9+ build-and-publish :
10+ runs-on : ubuntu-latest
11+ steps :
12+ - name : Checkout repository
13+ uses : actions/checkout@v3
14+
15+ - name : Setup Python
16+ uses : actions/setup-python@v4
17+ with :
18+ python-version : ' 3.6' # Python version
19+
20+ - name : Upgrade pip
21+ run : pip install --upgrade pip
22+
23+ - name : Install build dependencies
24+ run : pip install build
25+
26+ - name : Build the package
27+ run : python -m build --sdist --wheel
28+
29+ - name : Publish to PyPI via Twine
30+ env :
31+ PYPI_API_TOKEN : ${{ secrets.PYPI_API_TOKEN }}
32+ run : |
33+ pip install twine
34+ twine upload dist/* -u __token__ -p $PYPI_API_TOKEN
You can’t perform that action at this time.
0 commit comments