Skip to content

Commit c01a5b9

Browse files
ci(pypi): OIDC trusted publisher (manual-only) (#60)
1 parent 1f85235 commit c01a5b9

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

.github/workflows/publish-pypi.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: publish-pypi
2+
on:
3+
workflow_dispatch: {} # Solo manual (seguro)
4+
5+
permissions:
6+
contents: read
7+
id-token: write # OIDC (sin token)
8+
9+
jobs:
10+
pypi:
11+
environment: pypi # coincide con PyPI (opcional, recomendado)
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
- uses: actions/setup-python@v5
16+
with: { python-version: '3.12' }
17+
- run: python -m pip install -U pip build
18+
- run: python -m build # genera dist/*
19+
- uses: pypa/gh-action-pypi-publish@release/v1
20+
with:
21+
packages-dir: dist/ # OIDC -> no password

0 commit comments

Comments
 (0)