Skip to content

Commit

Permalink
Use trusted publishing by pypi (#346)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomplus authored Dec 26, 2024
1 parent 84e4e28 commit 3ab6408
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,16 @@
#
name: Publish to PyPI

on: [push, pull_request]
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
Expand All @@ -29,6 +33,3 @@ jobs:
- name: Publish to PyPI
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.pypi_api_token }}

0 comments on commit 3ab6408

Please sign in to comment.