Debian Codegraph @

.github/workflows/pypi-release.yml

raw
1 name: Release to PyPI
2 on:
3 release:
4 types: [created]
5 workflow_dispatch:
6 jobs:
7 pypi_publish:
8 runs-on: ubuntu-latest
9 steps:
10 - uses: actions/checkout@v4
11 - name: Set up Python 3.10
12 uses: actions/setup-python@v5
13 with:
14 python-version: '3.10'
15 - name: Install Tools
16 run: |
17 python -m pip install --upgrade pip
18 pip install build packaging setuptools wheel twine
19 if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
20 - name: Build and Publish
21 env:
22 TWINE_USERNAME: __token__
23 TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
24 run: |
25 python3 -m build --wheel --no-isolation
26 twine upload dist/*