File tree Expand file tree Collapse file tree 1 file changed +37
-0
lines changed
Expand file tree Collapse file tree 1 file changed +37
-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*.*.*" # e.g. v0.1.0, v1.2.3
7+
8+ jobs :
9+ build-and-publish :
10+ runs-on : ubuntu-latest
11+
12+ steps :
13+ - name : Check out repository
14+ uses : actions/checkout@v4
15+
16+ - name : Set up Python
17+ uses : actions/setup-python@v5
18+ with :
19+ python-version : " 3.11"
20+
21+ - name : Install build tools
22+ run : |
23+ python -m pip install --upgrade pip
24+ pip install build twine
25+
26+ - name : Build sdist and wheel
27+ run : python -m build
28+
29+ - name : Check distribution files
30+ run : twine check dist/*
31+
32+ - name : Publish to PyPI
33+ if : startsWith(github.ref, 'refs/tags/')
34+ uses : pypa/gh-action-pypi-publish@release/v1
35+ with :
36+ user : __token__
37+ password : ${{ secrets.PYPI_API_TOKEN }}
You can’t perform that action at this time.
0 commit comments