Skip to content

Commit 685986b

Browse files
committed
ci: add PyPI trusted publishing workflow
1 parent df9fcbf commit 685986b

1 file changed

Lines changed: 31 additions & 0 deletions

File tree

.github/workflows/publish.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Publish to PyPI
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
permissions:
8+
id-token: write
9+
10+
jobs:
11+
publish:
12+
name: Build and publish
13+
runs-on: ubuntu-latest
14+
environment: pypi
15+
steps:
16+
- uses: actions/checkout@v4
17+
with:
18+
fetch-depth: 0
19+
20+
- uses: actions/setup-python@v5
21+
with:
22+
python-version: "3.12"
23+
24+
- name: Install build
25+
run: pip install build
26+
27+
- name: Build package
28+
run: python -m build
29+
30+
- name: Publish to PyPI
31+
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)