We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d062268 commit b124f5dCopy full SHA for b124f5d
.github/workflows/release.yml
@@ -0,0 +1,34 @@
1
+name: Release
2
+
3
+on:
4
+ release:
5
+ types: [published]
6
7
+jobs:
8
+ publish-pypi:
9
+ runs-on: ubuntu-latest
10
+ environment: pypi
11
+ permissions:
12
+ id-token: write # required for trusted publishing (OIDC)
13
14
+ steps:
15
+ - uses: actions/checkout@v4
16
17
+ - name: Setup Python
18
+ uses: actions/setup-python@v5
19
+ with:
20
+ python-version: "3.12"
21
22
+ - name: Set version from tag
23
+ run: |
24
+ VERSION="${GITHUB_REF_NAME#v}"
25
+ sed -i "s/^version = .*/version = \"$VERSION\"/" pyproject.toml
26
27
+ - name: Install build tools
28
+ run: pip install build
29
30
+ - name: Build package
31
+ run: python -m build
32
33
+ - name: Publish to PyPI (trusted publishing)
34
+ uses: pypa/gh-action-pypi-publish@release/v1
0 commit comments