Skip to content

Commit ecc0237

Browse files
committed
updates for "trusted publisher"
1 parent b43c2b2 commit ecc0237

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ jobs:
66
build-n-publish:
77
name: Build and publish package to PyPI and TestPyPI
88
runs-on: ubuntu-22.04
9+
permissions:
10+
# IMPORTANT: this permission is mandatory for trusted publishing
11+
id-token: write
912
steps:
1013
- uses: actions/checkout@master
1114
- name: Set up Python 3.7
@@ -29,13 +32,13 @@ jobs:
2932
- name: Publish package to Test PyPI
3033
uses: pypa/gh-action-pypi-publish@release/v1
3134
with:
32-
password: ${{ secrets.test_pypi_token }}
35+
#password: ${{ secrets.test_pypi_token }}
3336
repository_url: https://test.pypi.org/legacy/
3437
skip_existing: true
3538
- name: Publish package to PyPI
3639
if: startsWith(github.ref, 'refs/tags')
3740
uses: pypa/gh-action-pypi-publish@release/v1
3841
with:
39-
password: ${{ secrets.pypi_token }}
42+
#password: ${{ secrets.pypi_token }}
4043
skip_existing: true
4144

0 commit comments

Comments
 (0)