Debian Codegraph @

.github/workflows/publish.yml

raw
1 # This workflow will upload a Python Package using Twine when a release is created
2 # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries
3
4 # This workflow uses actions that are not certified by GitHub.
5 # They are provided by a third-party and are governed by
6 # separate terms of service, privacy policy, and support
7 # documentation.
8
9 name: Upload Python Package
10
11 on:
12 release:
13 types: [published]
14
15 permissions: {}
16
17 jobs:
18 deploy:
19
20 runs-on: ubuntu-latest
21
22 steps:
23 - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
24 - name: Set up Python
25 uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
26 with:
27 python-version: '3.x'
28 - name: Install dependencies
29 run: |
30 python -m pip install --upgrade pip
31 pip install build
32 - name: Build package
33 run: python -m build
34 - name: Publish package
35 uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # v1.14.2
36 with:
37 user: __token__
38 password: ${{ secrets.PYPI_API_TOKEN }}