Skip to content

Commit

Permalink
.github: create PyPI workflow
Browse files Browse the repository at this point in the history
Signed-off-by: Emmanuel Blot <[email protected]>
  • Loading branch information
eblot committed Nov 23, 2024
1 parent ccd78da commit 583f94f
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Publish to PyPI

on:
release:
types:
- published
workflow_dispatch:
inputs:
twine_verbose:
description: 'Enable Twine verbose mode'
required: true
type: boolean

jobs:
pypi-publish:
name: upload release to PyPI
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/pyftdi
permissions:
id-token: write
strategy:
matrix:
python-version: ['3.13']
steps:

- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel
- name: Build package
run: |
python setup.py bdist_wheel
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
verbose: ${{ inputs.twine_verbose }}
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ def main():
maintainer_email=find_meta('email'),
keywords=KEYWORDS,
long_description=read_desc('pyftdi/doc/index.rst'),
long_description_content_type='text/x-rst',
packages=PACKAGES,
scripts=['pyftdi/bin/i2cscan.py',
'pyftdi/bin/ftdi_urls.py',
Expand Down

0 comments on commit 583f94f

Please sign in to comment.