Skip to content

Commit 35dca6d

Browse files
committed
Use pypi OIDC
1 parent 0b5ddd8 commit 35dca6d

1 file changed

Lines changed: 11 additions & 9 deletions

File tree

.github/workflows/python-publish.yml

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
# This workflow 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
1+
# This workflow will upload a Python Package to PyPI when a release is created
2+
# Uses PyPI trusted publishing (OIDC) — no secrets required.
3+
# Configure at: https://pypi.org/manage/project/ioc-finder/settings/publishing/
34

45
name: Upload Python Package to PyPi
56

@@ -13,6 +14,10 @@ jobs:
1314

1415
runs-on: ubuntu-latest
1516

17+
permissions:
18+
id-token: write # required for OIDC trusted publishing
19+
contents: read
20+
1621
steps:
1722
- uses: actions/checkout@v4
1823
with:
@@ -27,10 +32,7 @@ jobs:
2732
python-version: '3.x'
2833
- name: Set up uv
2934
uses: astral-sh/setup-uv@v6
30-
- name: Build and publish
31-
env:
32-
UV_PUBLISH_USERNAME: ${{ secrets.PYPI_USERNAME }}
33-
UV_PUBLISH_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
34-
run: |
35-
uv build
36-
uv publish
35+
- name: Build
36+
run: uv build
37+
- name: Publish to PyPI
38+
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)