Debian Codegraph @

.github/workflows/pythonpublish.yml

raw
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:
9 - published
10
11 jobs:
12 deploy:
13 runs-on: ubuntu-latest
14 environment:
15 name: pypi
16 url: https://pypi.org/p/pyhomeworks
17 permissions:
18 id-token: write
19 steps:
20 - uses: actions/[email protected]
21 - name: Set up Python
22 uses: actions/[email protected]
23 with:
24 python-version: '3.12'
25 - name: Install dependencies
26 run: |
27 python -m pip install --upgrade pip
28 pip install build
29 - name: Build package
30 run: python -m build
31 - name: Publish package
32 uses: pypa/[email protected]