Skip to content

Commit bd95c2d

Browse files
authored
Update release-pypi.yml
1 parent 394f920 commit bd95c2d

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

.github/workflows/release-pypi.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,21 @@ on:
66
tags:
77
- "v*.*.*"
88

9+
permissions:
10+
contents: read
11+
id-token: write # REQUIRED for PyPI Trusted Publishing (OIDC)
12+
913
jobs:
1014
build-publish-pypi:
1115
runs-on: ubuntu-latest
16+
# environment: pypi # uncomment if you set an Environment and referenced it on PyPI
1217
steps:
1318
- uses: actions/checkout@v4
1419
- uses: actions/setup-python@v5
1520
with:
1621
python-version: "3.11"
1722
- run: python -m pip install --upgrade build
1823
- run: python -m build
19-
- name: Publish to PyPI
24+
- name: Publish to PyPI (Trusted Publishing)
2025
uses: pypa/gh-action-pypi-publish@release/v1
21-
with:
22-
password: ${{ secrets.PYPI_API_TOKEN }}
26+
# no 'password:' when using Trusted Publishing

0 commit comments

Comments
 (0)