File tree Expand file tree Collapse file tree 1 file changed +56
-0
lines changed
Expand file tree Collapse file tree 1 file changed +56
-0
lines changed Original file line number Diff line number Diff line change 1+ name : release
2+ on :
3+ # Always test on pull_request, but do not do release (see check for tag below)
4+ pull_request :
5+ push :
6+ tags :
7+ - v*
8+
9+ jobs :
10+ build :
11+ runs-on : ubuntu-latest
12+ steps :
13+ - uses : actions/checkout@v3
14+ with :
15+ fetch-depth : 0
16+ - run : git fetch --force --tags
17+ - uses : actions/setup-python@v4
18+ - run : sudo apt-get install -y libmad0-dev
19+ - run : python -m pip install --upgrade pip
20+ - run : python -m pip install build
21+ - run : python -m build --sdist --wheel --outdir dist/
22+ - uses : actions/upload-artifact@v1
23+ with :
24+ name : dist
25+ path : dist
26+
27+
28+ release :
29+ needs : build
30+ runs-on : ubuntu-latest
31+ permissions :
32+ contents : write
33+ steps :
34+ - uses : actions/checkout@v3
35+ - uses : softprops/action-gh-release@v1
36+ # Only on a tag
37+ if : github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
38+ with :
39+ generate_release_notes : true
40+ files : |
41+ dist/*.tar.gz
42+ dist/*.whl
43+
44+ publish :
45+ needs : [build, release]
46+ runs-on : ubuntu-latest
47+ permissions :
48+ id-token : write
49+ steps :
50+ - uses : actions/download-artifact@v3
51+ with :
52+ name : dist
53+ path : dist
54+ - uses : pypa/gh-action-pypi-publish@release/v1
55+ # Only on a tag
56+ if : github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
You can’t perform that action at this time.
0 commit comments