8000 CI Use Trusted Publishers for uploading wheels to PyPI (#26249) · scikit-learn/scikit-learn@ea5a254 · GitHub
[go: up one dir, main page]

Skip to content

Commit ea5a254

Browse files
authored
CI Use Trusted Publishers for uploading wheels to PyPI (#26249)
1 parent 789c068 commit ea5a254

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

.github/workflows/publish_pypi.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ on:
1313
jobs:
1414
publish:
1515
runs-on: ubuntu-latest
16+
permissions:
17+
# IMPORTANT: this permission is mandatory for trusted publishing
18+
id-token: write
1619
steps:
1720
- uses: actions/checkout@v3
1821
- uses: actions/setup-python@v4
@@ -35,15 +38,10 @@ jobs:
3538
run: |
3639
python build_tools/github/check_wheels.py
3740
- name: Publish package to TestPyPI
38-
uses: pypa/gh-action-pypi-publish@v1.4.1
41+
uses: pypa/gh-action-pypi-publish@v1.8.5
3942
with:
40-
user: __token__
41-
password: ${{ secrets.TEST_PYPI_TOKEN }}
4243
repository_url: https://test.pypi.org/legacy/
4344
if: ${{ github.event.inputs.pypi_repo == 'testpypi' }}
4445
- name: Publish package to PyPI
45-
uses: pypa/gh-action-pypi-publish@v1.4.1
46-
with:
47-
user: __token__
48-
password: ${{ secrets.PYPI_TOKEN }}
46+
uses: pypa/gh-action-pypi-publish@v1.8.5
4947
if: ${{ github.event.inputs.pypi_repo == 'pypi' }}

0 commit comments

Comments
 (0)
0