File tree Expand file tree Collapse file tree 1 file changed +55
-0
lines changed Expand file tree Collapse file tree 1 file changed +55
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Release
2+ on :
3+ push :
4+ tags :
5+ - V*
6+ branches :
7+ - main
8+ pull_request :
9+ branches :
10+ - main
11+ workflow_dispatch :
12+
13+ jobs :
14+ pure-python-wheel-and-sdist :
15+ name : Build a pure Python wheel and source distribution
16+ runs-on : ubuntu-latest
17+
18+ steps :
19+ - uses : actions/checkout@v2
20+ with :
21+ # Fetch all tags
22+ fetch-depth : 0
23+
24+ - name : Install build dependencies
25+ run : python -m pip install --upgrade build
26+
27+ - name : Build
28+ run : python -m build
29+
30+ - uses : actions/upload-artifact@v2
31+ with :
32+ name : artifacts
33+ path : dist/*
34+ if-no-files-found : error
35+
36+ publish :
37+ name : Publish release
38+ needs :
39+ - pure-python-wheel-and-sdist
40+ runs-on : ubuntu-latest
41+ if : github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
42+
43+ steps :
44+ - uses : actions/download-artifact@v2
45+ with :
46+ name : artifacts
47+ path : dist
48+
49+ - name : Push build artifacts to PyPI
50+ 51+ with :
52+ skip_existing : true
53+ user : __token__
54+ password : ${{ secrets.TEST_PYPI_API_TOKEN }}
55+ repository_url : " https://test.pypi.org/legacy/"
You can’t perform that action at this time.
0 commit comments