Debian Codegraph @

.github/workflows/python-publish.yml

raw symbols SCIP
1 # This workflows will upload a Python Package using Twine when a release is created
2 # For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
3
4 name: Upload Python Package
5
6 on:
7 release:
8 types: [created]
9
10 jobs:
11 deploy:
12 runs-on: ubuntu-latest
13 environment:
14 name: pypi
15 url: https://pypi.org/p/autopep8
16 permissions:
17 id-token: write
18 steps:
19 - uses: actions/checkout@v4
20 - name: Set up Python
21 uses: actions/setup-python@v5
22 with:
23 python-version: '3.x'
24 - name: Install dependencies
25 run: |
26 python -m pip install --upgrade pip build
27 pip install setuptools wheel twine
28 - name: Build
29 run: |
30 python -m build
31 - name: Publish distribution 📦 to PyPI
32 uses: pypa/gh-action-pypi-publish@release/v1
33 with:
34 password: ${{ secrets.PYPI_API_TOKEN }}