Skip to content

Commit 45cc60f

Browse files
committed
enhance: [24]Publishing releases with trusted publisher
Ref: https://docs.pypi.org/trusted-publishers/using-a-publisher/ See also: milvus-io#2440 Signed-off-by: yangxuan <[email protected]>
1 parent 5460c02 commit 45cc60f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.github/workflows/publish_on_release.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ jobs:
88
build-n-publish:
99
name: Build and publish Python 🐍 distributions 📦 to PyPI
1010
runs-on: ubuntu-latest
11+
environment: pypi
12+
permissions:
13+
id-token: write
1114

1215
steps:
1316
- name: Check out from Git
@@ -37,10 +40,7 @@ jobs:
3740
- name: Publish distribution 📦 to Test PyPI
3841
uses: pypa/gh-action-pypi-publish@release/v1
3942
with:
40-
password: ${{ secrets.TOKEN_TEST_PYPI }}
4143
repository-url: https://test.pypi.org/legacy/
4244
- name: Publish distribution 📦 to PyPI
4345
if: startsWith(github.ref, 'refs/tags')
4446
uses: pypa/gh-action-pypi-publish@release/v1
45-
with:
46-
password: ${{ secrets.PYPI_API_TOKEN }}

0 commit comments

Comments
 (0)