Skip to content

Commit c0fade0

Browse files
Use trusted publishing
1 parent 4807a84 commit c0fade0

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

.github/workflows/publish-to-pypi.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,21 @@ on:
77
jobs:
88
build-and-publish:
99
name: Builds and publishes releases to PyPI
10+
environment: pypi
11+
permissions:
12+
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
1013
runs-on: ubuntu-latest
1114
steps:
1215
- uses: actions/[email protected]
1316
- name: Set up Python 3.12
1417
uses: actions/[email protected]
1518
with:
1619
python-version: "3.12"
17-
- name: Install wheel
20+
- name: Install build
1821
run: |-
19-
pip install wheel
22+
pip install build
2023
- name: Build
2124
run: |-
22-
pip install build
2325
python -m build
2426
- name: Publish release to PyPI
2527
uses: pypa/[email protected]
26-
with:
27-
user: __token__
28-
password: ${{ secrets.PYPI_TOKEN }}

0 commit comments

Comments
 (0)