File tree Expand file tree Collapse file tree 1 file changed +41
-0
lines changed
Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Publish Package
2+
3+ on :
4+ push :
5+ tags :
6+ - ' v*'
7+
8+ concurrency :
9+ group : publish
10+
11+
12+ jobs :
13+ publish :
14+ if : github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
15+ name : Upload release to Github Releases and PyPI
16+ runs-on : ubuntu-latest
17+ permissions :
18+ id-token : write
19+ contents : write
20+ environment : publish
21+ steps :
22+ - uses : actions/checkout@v3
23+ with :
24+ fetch-depth : 0
25+ - name : Set up Python 3.11
26+ uses : actions/setup-python@v4
27+ with :
28+ python-version : " 3.11"
29+ - name : Build package
30+ run : |
31+ python -m pip install twine build
32+ python -m build --wheel --sdist
33+ python -m twine check dist/*
34+ ls -la dist
35+ - name : Create Release and Upload
36+ id : create_release
37+ env :
38+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
39+ run : |
40+ gh release create ${{ github.ref_name }} --repo ${{ github.repository }} --verify-tag --generate-notes --title "Release ${{ github.ref_name }}"
41+ gh release upload ${{ github.ref_name }} --repo ${{ github.repository }} dist/*
You can’t perform that action at this time.
0 commit comments