Skip to content

Commit bcb192b

Browse files
Enable PyPI trusted publishing
1 parent f732094 commit bcb192b

1 file changed

Lines changed: 33 additions & 0 deletions

File tree

.github/workflows/publish-pypi.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Publish to PyPI
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
publish:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
id-token: write
13+
14+
steps:
15+
- uses: actions/checkout@v6
16+
17+
- name: Set up Python
18+
uses: actions/setup-python@v6
19+
with:
20+
python-version: '3.12'
21+
cache: 'pip'
22+
23+
- name: Install publish requirements
24+
run: python -m pip install -r publish-requirements.txt
25+
26+
- name: Build distributions
27+
run: python setup.py sdist bdist_wheel --universal
28+
29+
- name: Check distributions
30+
run: python -m twine check dist/* --strict
31+
32+
- name: Publish to PyPI
33+
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)