Skip to content

Commit 03c33be

Browse files
committed
.github: create PyPI workflow
Signed-off-by: Emmanuel Blot <emmanuel.blot@free.fr>
1 parent 075a734 commit 03c33be

File tree

2 files changed

+48
-0
lines changed

2 files changed

+48
-0
lines changed

.github/workflows/pypi.yml

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Publish to PyPI
2+
3+
on:
4+
release:
5+
types:
6+
- published
7+
workflow_dispatch:
8+
inputs:
9+
twine_verbose:
10+
description: 'Enable Twine verbose mode'
11+
required: true
12+
type: boolean
13+
14+
jobs:
15+
pypi-publish:
16+
name: upload release to PyPI
17+
runs-on: ubuntu-latest
18+
environment:
19+
name: pypi
20+
url: https://pypi.org/p/pyftdi
21+
permissions:
22+
id-token: write
23+
strategy:
24+
matrix:
25+
python-version: ['3.13']
26+
steps:
27+
28+
- uses: actions/checkout@v4
29+
30+
- name: Set up Python ${{ matrix.python-version }}
31+
uses: actions/setup-python@v5
32+
with:
33+
python-version: ${{ matrix.python-version }}
34+
35+
- name: Install dependencies
36+
run: |
37+
python -m pip install --upgrade pip
38+
pip install setuptools wheel
39+
40+
- name: Build package
41+
run: |
42+
python setup.py bdist_wheel
43+
44+
- name: Publish package distributions to PyPI
45+
uses: pypa/gh-action-pypi-publish@release/v1
46+
with:
47+
verbose: ${{ inputs.twine_verbose }}

setup.py

+1
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,7 @@ def main():
171171
maintainer_email=find_meta('email'),
172172
keywords=KEYWORDS,
173173
long_description=read_desc('pyftdi/doc/index.rst'),
174+
long_description_content_type='text/x-rst',
174175
packages=PACKAGES,
175176
scripts=['pyftdi/bin/i2cscan.py',
176177
'pyftdi/bin/ftdi_urls.py',

0 commit comments

Comments
 (0)