From a75578fb07a8e3d6ab3be486bf5dfd57e4df8d20 Mon Sep 17 00:00:00 2001 From: yangxuan Date: Tue, 7 Jan 2025 10:25:53 +0800 Subject: [PATCH] enhance: Publishing with trusted publisher See also: #2440 Signed-off-by: yangxuan --- .github/workflows/publish_dev_package.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish_dev_package.yml b/.github/workflows/publish_dev_package.yml index 674eae7d2..f6aee86bc 100644 --- a/.github/workflows/publish_dev_package.yml +++ b/.github/workflows/publish_dev_package.yml @@ -9,6 +9,9 @@ jobs: build-n-publish: name: Build and publish Python 🐍 distributions 📦 to TestPyPI runs-on: ubuntu-latest + environment: testpypi + permissions: + id-token: write steps: - name: Check out from Git @@ -38,6 +41,5 @@ jobs: - name: Publish distribution 📦 to Test PyPI uses: pypa/gh-action-pypi-publish@release/v1 with: - password: ${{ secrets.TOKEN_TEST_PYPI }} repository-url: https://test.pypi.org/legacy/