We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e7ab2eb commit a5ced11Copy full SHA for a5ced11
1 file changed
.github/workflows/publish.yml
@@ -0,0 +1,36 @@
1
+name: Publish to PyPI and GitHub Releases
2
+
3
+on:
4
+ push:
5
+ tags:
6
+ - 'v*'
7
8
+jobs:
9
+ publish:
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - uses: actions/checkout@v4
13
14
+ - name: Set up Python
15
+ uses: actions/setup-python@v4
16
+ with:
17
+ python-version: '3.12'
18
19
+ - name: Install build tools
20
+ run: pip install build twine
21
22
+ - name: Build package
23
+ run: python -m build
24
25
+ - name: Publish to PyPI
26
+ if: startsWith(github.ref, 'refs/tags/')
27
+ uses: pypa/gh-action-pypi-publish@release/v1
28
29
+ user: __token__
30
+ password: ${{ secrets.PYPI_API_TOKEN }}
31
32
+ - name: Create GitHub Release
33
+ uses: softprops/action-gh-release@v1
34
35
+ files: dist/*
36
+ generate_release_notes: true
0 commit comments