Skip to content

Use trusted publishing by pypi #417

Use trusted publishing by pypi

Use trusted publishing by pypi #417

Workflow file for this run

# This workflows will test the build of the Python package into a software
# distribution and a wheel, and if a tag is pushed, also upload it to PyPI.
#
name: Publish to PyPI
on: [push]
jobs:
publish-to-pypi:
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/kubernetes-asyncio
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: pip install build
run: |
pip install build
pip list
- name: build --sdist --wheel .
run: |
python -m build --sdist --wheel .
ls -l dist
sha256sum dist/* | tee SHA256SUMS
- name: Publish to PyPI
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1